Results 1 to 2 of 2

Thread: Question on generating many-to-many relationship generation via DBRE

  1. #1
    Join Date
    Nov 2011
    Location
    Charlotte, NC, USA
    Posts
    21

    Default Question on generating many-to-many relationship generation via DBRE

    Hi all:

    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?!

    Chris

  2. #2
    Join Date
    Dec 2005
    Posts
    930

    Default

    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.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •