instance « Load « JPA Q&A





1. @ElementCollection Java Persistence (Hibernate) Causes Loading of Duplicate Instances    stackoverflow.com

When using @ElementCollection, load all is loading multiple instances of an object. More specifically, it is loading one instance for each element in the collectionOfStrings. For example, a database with a single ...

3. Same object being loaded from cache for every instance...    forum.hibernate.org

I've got my mappings all working with one exception, I've got a class that I think I haven't mapped correctly because every record read from the database gets equated to one object already in the cache when they don't really equal one another. I think I need a UserType, so I wrote one, but where/how do you specify it when using ...

4. get/load to return multiple instances    forum.hibernate.org

Does a method like this exist? (returns array of objects instead of single instance) public Object[] get(Class clazz, Serializable[] ids) throws HibernateException; I've been hunting around for awhile trying find a quick and easy way to retrieve multiple instances of a class given an array of ids. The idea behind this is fairly straightforward - you have a web page where ...

6. Loading wrong Class-Instance    forum.hibernate.org

Hi, I have some Problems with Hibernate and instancing the right Objects. I have one Class named Account. This is abstract. Two additional Classes inherite from Account and are named DAccount and KAccount. The have discriminatiors in the Database. In the Class Partner I have a Set of Account: When I load a Partner, ...

7. Loading of Superclass instead of Subclass instance    forum.hibernate.org

Newbie Joined: Thu Mar 30, 2006 9:25 am Posts: 1 Hello there, I have this problem when mapping a collection, whose elements are of different classes in the inheritence structure (I know, the inheritence structure or at least its usage is not very well thought through, but I'm trying to avoid changing it). I have a list of objects, which I ...

8. Duplicate instances are loaded when firing join query    forum.hibernate.org

Newbie Joined: Mon Jun 16, 2008 9:32 am Posts: 2 Hi, The Problem: We are facing an issue in which when we are issuing a join query (on two tables), duplicate instances of one class (mapped to one of the table) are loaded. Observation: We have observed that the final query formed by Hibernate is when picked up and manually fired ...