aspose file tools*
The moose likes Object Relational Mapping and the fly likes Error when saving relationship Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Error when saving relationship" Watch "Error when saving relationship" New topic
Author

Error when saving relationship

Sathya Sekar
Greenhorn

Joined: Dec 17, 2003
Posts: 15
Hello,

I am trying out a simple one-many relationship using XDoclet :

The parent's XML :



and the class code :





The child's XML :



and the class code :




I am trying to add the child to the parent :




This causes the below failure :



This error does not happen if I follow the route of
- save parent and commit
- save child and commit
- add child to parent and commit

Anything I am doing wrong ?

Thanks.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Sathya take a look at this and also investigate more on native keys. I guess these are creating you problems.

./pope


blog - InfoQ.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error when saving relationship
 
Similar Threads
Cascading update problem
what changes should i made in save method in one-to-many relationships
Hibernate 3.0 : Where am I going wrong?
Parent-Child Mapping with Hibernate 2.0
PropertyAccessException: IllegalArgumentException occurred calling getter