aspose file tools
The moose likes Object Relational Mapping and the fly likes Hibernate list persistance Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Hibernate list persistance " Watch "Hibernate list persistance " New topic
Author

Hibernate list persistance

Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
Hi,
I'm building a word processor that has a version control and saves each paragraph to the database. One version is composed by several paragraphs. A new version is created each time Users enters the editor, and each time they save the document it is saved to the same version, until they access the editor again.
The problem is that the paragraphs are only saved properly te first time. Any further save, will save the version and the paragraps but not the relation between them. So any paragraph created after the first save is persisted, but cannot be retrieved, since it's not associated to the version.

Here's the mapping:


Here's the code that saves:


And finally here's the dao code


If anyone knows what's the problem it would be great.
Thanks,
Pablo.


2B || !2B
 
 
subject: Hibernate list persistance
 
Threads others viewed
Hibernate Insert - help
Hibernate Issue
Hibernate not saving
Hibernate insert
Unidirectional one-to-many problem
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com