hello every one... i have used hibernate in some projects before and when i want to map a bidirectional one-to-many association i use a set and a foreign key, cascading (all-delete orphan) and inverse=true. I have read somewhere ( "Beginning hibernate, From novice to professional", Apress, p.87-88 ) , that i can use a link table to maintain a one-to-many association . the parent and child tables will have both foreign keys which will be the PK of the link table. also i must use a unique constraint on one of the sides (or else it would be a many to many )... i have never used that before. my question is, which is more efficient in terms of database crud functions and maintenance and why? thank you in advance.
|