I found this from David Jones:
> Foreign keys are done for type "one" relationships, not type many. A type
> "many" relationship is usually just the reverse direction of a type "one"
> relationship so the FK covers both.
>
> What would it mean to have a foreign key on a type "many" relationship?"

Then a corresponding "one" relation will supply the foreign key constraint?

What about a many-to-many relation? Look at entity PartyAttribute and PartyTypeAttr for example. Is that a many-to-many? Looks odd, though. A many-to-many usually requires a separate "match-make" table.

Is it correct to say that OFBiz does not do foreign key constraints with type 
"many" relations?

Do we have to insert an additional type "one" relation on field "attrName" in order to get the foreign key constraints checks? But can a "one" relation be created without specifying the full primary key?

Looks like the type "many" relation is merely a convenient means to do a query like "where attrName = whatever", so we can do a simple getRelated().

Jonathon

Reply via email to