Forums Register Login

one to many Mapping @ Hibernate.

+Pie Number of slices to send: Send
In my application we are using one to many mapping.Where we have 3 table .

Master Table
Parent Table
Child Table

Parent table is a one-to-one mapping with Master Table. Now we are mapping the Master Table Id(which is in Parent table as Foreign key) and mapping with the child table with one to many relation ship. In this scenario we are not able to load child element only the parent objects get loaded.

My peer developer is saying that you can't use the one-to-many mapping until you don't have foreign relation ship with you child table.I am not sure whether that is correct ???.

In this problem you don't have direct foreign key relationship with parent and child table.do you guys have any thoughts on this.

Thanks in advance and please let me know if you have any clarification in this problem. thanks again
+Pie Number of slices to send: Send
Is that true that we can't map one-to-many is they don't have primary and foreign key relationship???
Enjoy the full beauty of the english language. Embedded in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1375 times.
Similar Threads
Can Foreign key be Null for some rows?
Cascading non foreign key to Child Table
Address-has-one-Customer with multiplicity many using foreign-key mapping
hiberante - one-to -many
ORM as compared to JDBC
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:28:07.