Announcement Announcement Module
Collapse
No announcement yet.
manytomany with DBRE Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • manytomany with DBRE

    The DBRE documentation states
    "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."

    To save people some frustration and time .. this is to
    a) note that it is quite strict about the requirement that the two foreign keys are declared as a composite primary key (a unique constraint/undex on the same two columns is enough for oracle but not DBRE) , and

    b) query whether this strictness is entirely neccessary?

    Quite a few of the many-to-many tables I've come across in Oracle shops at least... have a uniqe index and constraint declared instead of a primary key and as far as I can see it has the same effect. DBRE will map these as a pair of OneToMany relations and declare the join table as an entity in it's own right.
Working...
X