Hi All,
I am new to Hibernate. From last some days I have searched most of the forum post and Hibernate Ref documentation.
Here is my problem. Coupld someone help me.
I have got very complex Database schema and presently I am using handwritten DAO with postgreSQL database to insert the record using database sequence.
Is it possible from hibernate to insert the record(I know how to use sequence with hibernate) and return the key so that this could be used to insert in ref table.
For ex: I got user table and usergroup which has many-to-many relationship using the ref table user_usergroupmapping.
Now if I can insert the record in user table and get the key, similarly for usegroup then I can insert the reference keys in the mapping table.
How do i do it with hibernate or is there any other way to do it in hibernate?
Any link to documentation or tutorial will help.
Regards,
Umesh
|