Hi,
I'm evaluating the product (so far I think it's great!). One thing that has come up is when trying to create a many-to-many relationship where the join table is actually a sub-type of the middle table.
Basic Table Defs:
Accounts Table (left table):
accounts.id
accounts.name
....
Project_Relation (join table):
project_relation.id
project_relation.relation_type
project_relation.relation_id
project_relation.project_id
...
Project (right table):
project.id
project.name
....
I created a sub-type called ProjectAccounts where the discriminator field is project_relation.relation_type and the discriminator value is "Accounts" .
I created a Relationship 1:n between Accounts and ProjectAccounts and then created a 1:n relationship between Projects and ProjectRelation. I left the "automatically detect m:n relationships" checked, so the m:n relationships were generated. The relationships / classes all generated fine.
If I reference Account.ProjectAccounts property and review the SQL, the discriminator value is included in the WHERE condition.
However, if I reference the Accounts.ProjectCollectionViaProjectAccounts collection and review the SQL, it DOES NOT include the discriminator value in the actual SQL.
Is this a known issue, or am I not doing something properly?
ps: I'm evaluating the product by modeling a popular open source CRM system. I'm about 75% complete in less than a day! Cool stuff
Thanks!
Shawn