• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate list persistance  RSS feed

Pablo M´┐Żller
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!