self « Association « JPA Q&A





1. does hibernate support self association?    stackoverflow.com

i have a problem like in simple words Animal has childs of type Horse which in turn has more childs of type Horse only. is it possible in hibernate as i am trying ...

2. creating many to many self-join association.. how to??    forum.hibernate.org

Dear all, I wanna create a many to many self join, from table User. Each user (might) have multiple parent-users (superiors) Each user (might) have multiple child-users (subordinate) Hibernate version = 2.1.2 Database = SQL Server 2000 User.java : import java.util.*; public class User { private String id; private String userName; private Set child; private Set parent; public String getId() { ...

3. self agregate to same Class object, one-to-many association    forum.hibernate.org

I've got a problem implementing a relation to one-to-many beetwin an object end a set of objects of same class. The class code is the following : /***********************************************************/ public class Groupe { private long m_uid; public long getUid(){ return m_uid; } public void setUid(long primaryKey){ m_uid = primaryKey; } private String m_nom; private Set m_sousGroupes = new HashSet(); public Groupe(){ } ...

4. Category self-association    forum.hibernate.org

Sorry I know this is in the example application but just couldn't get it to work. Any help would be much appreciated. When i save subCategory and Category seperately it works like a charm. But I can't get it to cascade with the following code... Any pointers anyone?

5. many-to-many self-referencing association    forum.hibernate.org

I want to do this: Person <---------> Person If Person A is a friend of Person B, than B is a friend of A A.getFriends().add(B); List listA = a.getFriends(); List listB = b.getFriends(); ListA will contain Person B List B will contain Pereson A. Is this possible in Hibernate - I've read the forums and the docs but this is not ...

6. associations to self    forum.hibernate.org

I have two classes, A and B, where B extends A. A is persistent : @hibernate.class table="ATable" A has some nice properties that are persistent, so far so good. However, A also has a property B (recall B is a subclass). Tagging A.getB() with : @hibernate.many-to-one column="b" class="B" is not successful. SchemaExport yields error "MappingException : Could not find class B". ...

7. Self-association. How to?    forum.hibernate.org

Hibernate version: 3.0 Hello everyone, I have doubts about how should I make a self association. It goes as follows: I have a PERSON table. This person table will have two special fields: Father, mother. The content of this field will be taken out of the same table. What kind of association is that? I suppose it's a many to one... ...

8. not-null/transient error with self referencing association    forum.hibernate.org

Author Message MrRove Post subject: not-null/transient error with self referencing association Posted: Fri Jan 05, 2007 1:39 pm Newbie Joined: Fri Jan 05, 2007 1:21 pm Posts: 4 I'm having a problem where saving a self-referencing association throws an exception when saving the associated object: Code: Exception in thread "main" org.hibernate.PropertyValueException: not-null property references a null or transient value ...

9. Hibernate Self-Association    forum.hibernate.org

Beginner Joined: Tue Jun 26, 2007 2:31 pm Posts: 21 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: Hibernate Version 3.0 Mapping documents: ...





10. Self referencing unidirectional Many-to-many association    forum.hibernate.org

Hibernate version: 3.2.1.GA Mapping document: Code: