PK « Load « JPA Q&A





1. Loading a class with a composite key without PK class    forum.hibernate.org

Hi, I have an object with the following key: I want to be able to do the equivalent of session.load(MyClass.class, id, groupInstance) , but I don't want to declare a PK class. As I understand, my alternatives are 1) declare a PK class 2) use a query to load the ...

2. load or get not working with composite PK    forum.hibernate.org

Hi all, Im using Hibernate 3 with an Firebird database. My problem is that I have an table with an composite PK and the get or load method in hibernate session is not working, debugging i see that the sql query generated is wrong, its include the name of the pk field in the query. Here is my class and the ...

3. Rows values loaded but nothing hydrated - no PK [FIXED]    forum.hibernate.org

Regular Joined: Fri Aug 18, 2006 2:40 pm Posts: 51 Location: Metz, France Hello, version: Hibernate 3.1.3 We used Database Explorer to reverse engineer a table with no primary keys. D.E. has generated two classes MyClass and MyClassId and one mapping which is shown below: Code: ?xml version="1.0"?> ...

6. one-to-one and lazy loading - only possible with PK assoc?    forum.hibernate.org

Quote: Does such a thing exist? If it doesn't that's ok because it explains the behavior we're seeing (unexpected eager loading of one-to-one associations), but if it does exist then let me know and I'll share the specifics of the mappings so we can find out what we're doing wrong. No, it is not possible to have the association lazy from ...