Nov 13th, 2011, 07:46 PM
Question on generating many-to-many relationship generation via DBRE
In reading the Roo documentation, I observed this:
Many-to-many associations are created if a join table is detected by DBRE. To be identified as a many-to-many join table, the table must have exactly two primary keys and have exactly two foreign-keys pointing to other entity tables and have no other columns.
I am wondering if their is some reason why the join table cannot have any other columns aside from the foreign key columns?!
Nov 14th, 2011, 08:50 PM
It's the only way I can avoid a new entity class from being created to represent the table. Modelling a join table with an extra column is out of scope for DBRE. You can always create the class yourself - see http://en.wikibooks.org/wiki/Java_Pe...onal_Co lumns for more information.
Last edited by Alan Stewart; Nov 14th, 2011 at 09:01 PM.