transitive « Update « JPA Q&A





1. Transitive save    stackoverflow.com

I have a question about hibernate. I want to save a small graph of detached objects :

session.save(new City(1));

Peron p = new Person(new City(1), new Street(2));
session.save(p);
Hibernate told me that city is transient but ...

2. Transitive persistence    forum.hibernate.org

Query relating to the cascade option 'delete-orphan' I have a table 'TableFoo' having a foreign key relationship with itself. This is how my hbm file looks like Now, in a session I pull out a particular record with all its children ...

3. questions abt Transitive persistence    forum.hibernate.org

------------------------------quoted------------------------------------------------- If the children in a parent/child relationship would be value typed (e.g. a collection of addresses or strings), their life cycle would depend on the parent and no further action would be required for convenient "cascading" of state changes. When the parent is saved, the value-typed child objects are saved and when the parent is deleted, the children will be ...

4. Problems with transitive persistence    forum.hibernate.org

I'm using hibernate 2.1, integrated with Spring. I'm having problems with transitive persistence. I have a many-to-many relationship, with a join table. I'm creating an "parent" object that has a collection of "children" objects, but when I try to save or update the parent object, anything happend with the children, just the others parent's attributes are saved. Any trace are printed. ...

5. Transitive Persistence Problems    forum.hibernate.org

Hibernate version: 2.1 Name and version of the database you are using: Firebird 1.5 I've tried to map a Device object that has a set of Feature objects (see below). After that, I wrote code to create a Device and a Feature, add the Feature to the Device's set and save the Device. The intent was to save the Feature as ...

6. Transitive Persistence Issue...    forum.hibernate.org

Here's the scenario: Classes: public class HtmlSite { private String name; private List pages; public String getName() { return name;} public String setName( String name ) {this.name = name}; public List getPages() { return pages; } public void setPages( List pages) { this.pages = pages; } } public class HtmlPage { private String name; public String getName() { return name;} public ...

7. Fundamental question regarding Transitive Persistence    forum.hibernate.org

Say I have a Person object that has an Address object. Now this is a one-one association. Now I set up the association to have cascade = "all" I retrieve a Person from the database in session1 Then I do Address a = person.getAddress(); a.setAddressLine1("line 1"); Then I do a session.save(person); As per transitive persistence when the Person is saved, the ...

8. transitive persistence in updating    forum.hibernate.org

Hi, I've got a question of transitive persistence that i would like to pose, to help me using hibernate. I've searched in other posts, and i can't find a solution to my problem. My question is: 1 - I've two objects (A and B), and A is associated with B in a relation many-to-one. I suppose that, when i create a ...

9. Transitive persistence and dreaded NotUniqueObjectException    forum.hibernate.org

Hi, I have a suspicion this subject has been BBQed many times, but can't find a definitive answer by searching through archives. Sorry for digging out buried corpse again if so. Environment: Hibernate 3.2.0.ga + Spring 1.2.6 +Hsqldb 1.8.0.7 What I'm trying to accomplish is utterly trivial: I have a class called Employee that has a many-to-many bidirectional relationship with a ...





10. Problem with Transitive Persistence    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: Mapping documents: Annotation Name and version of the database you are using: MySQL 5.0.x Hi Guy, I have a basic problem in bidirectional one-to-many association for transitive persistence when both parent and child are new object. I have following classes: Parent Code: Code: @Entity public class Parent implements java.io.Serializable ...