I have a table DRAFT_WORK holding temporary work by someone. When the user finishes, he submits the work whereupon the same should be saved in a permanent table WORK. The two tables are very similar except for 2 differences:- 1. an additional field in WORK for time of submission 2. both have the field ID which is the primary key and auto-generated and have to be sequential. However, the value in this field need not match in the draft and its permanent form because users can choose to delete draft work and not submit it.
My question:- Anyway to save data in DRAFT_WORK in hibernate to table WORK using mapping files and code? The tables have children and i try to implement this in hibernate using collections and i want the children to be saved as well.
|