Code Monkey home page Code Monkey logo

mapperdao's People

Contributors

kostaskougios avatar miroslavcsonka avatar rjaros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mapperdao's Issues

Awesome library

Hi! Why you chose g.code over github? It's more awesome help to project on 
github platform.

Original issue reported on code.google.com by [email protected] on 28 May 2013 at 3:42

Bulk inserts/updates

I tried to do a bulk insert of entities, and when I turn on the logging, I discovered that the ordering is not very efficient.
In fact, suppose I have an entity ProductEntity that have a one to many relation ProductAttribute.
In the logs, I can see insert p1, then batch for a11, a12, .., insert p2, then batch a21, a22,...
Is there a way like in hibernate to reoder the inserts
hibernate.order_inserts=true and hibernate.order_updates=true.
?
ie. having batch insert p1, p2, p3, .... then batch insert a11, a12,....a21, a22, ....

Load related entities with a single query

As far a I can see the library load every related entity of a given entity with a separate SQL query sent to the DB. This holds even for entities that are marked as lazy loaded.

E.g. for a entity with 3 related one-to-many entities, any select query sends 3 additional queries to the DB, a query per one-to-many relation. For a select query returning multiple rows, 3 additional queries are sent for every row. For a query returning 1000 rows it gives 3000 queries in total.

This is a huge performance bottleneck. I haven't find anything in the documentation, which could potentially solve the problem (except excluding some relations for the query, but this would case objects lacking relations, so it's not an option if the functionality needs it).

Is there a way to overcome this limitation?

foreign key column in Entity?

RE: https://code.google.com/p/mapperdao/wiki/OneToManyMappings

Why is there no mention of person_id in HouseEntity?

How does MapperDao know that person_id column is the foreign key to Person?

Original issue reported on code.google.com by datasurfer on 1 Mar 2013 at 11:35

Occasional java.lang.NoClassDefFoundError for compiles proxy classes

It looks like a code initializing proxy classes cache is not thread safe. Occasionally I get this exception:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.package.MyClass_$2
        at sun.reflect.GeneratedSerializationConstructorAccessor57.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:56)
        at com.googlecode.mapperdao.lazyload.LazyLoadManager.proxyFor(LazyLoadManager.scala:63)
        at com.googlecode.mapperdao.jdbc.impl.MapperDaoImpl.lazyLoadEntity(MapperDaoImpl.scala:338)
        at com.googlecode.mapperdao.jdbc.impl.MapperDaoImpl.$anonfun$toEntities$5(MapperDaoImpl.scala:301)
        at com.googlecode.mapperdao.internal.EntityMap.$anonfun$get$1(EntityMap.scala:46)

It looks like codeCache map contains an entry for a class that is not compiled or not available to the current class loader. It doesn't happen all the time and it seems to be quite random.

The code seems to be thread safe to me, but there's something wrong there definitely. Am I missing something? Any idea what could cause this exception?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.