java - Join many tables to one [Many-to-many and with extra columns] using Hibernate -


could me please, using hibernate , annotations want join 4 tables (prof, salle , groupe, cours) 1 (creneau). 4 of them have many-to-many relationship 5th table.

i googled it, know many-to-many relationship (i found case of 2 tables ) create link table join them, contains keys (in case there columns also)

this best link found join tutorial. solution found more appropriate problem repeat tutorial 4 tables (prof-creneau)/(salle/creneau) .... , same link table.

is best way achieve (for me seems repetitive) ?

classic @manytomany relationship refers between 2 entities.

if want many-to-many table relationship, column need join table.

here useful example:

http://www.mkyong.com/hibernate/hibernate-many-to-many-example-join-table-extra-column-annotation/


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -