In the OpenAccess metadata, when you have a many-to-many association, even though logically, both association endpoints have equal meaning, one is always the lead part, or the source of the association. The other part of it is the target of the association.
We can definitely improve the validation message as the relation is really not a parent-child one but more a source-target one.
The warning however, states that there are no columns in the join table that point to the target of the association. You should be able to pick those columns. If your Package and PackageSites entities have single Identity members(no multiple keys in the database) this warning will not affect the runtime of OpenAccess and you can just ignore it.
In case there is single identity property, the OpenAccess runtime will automatically detect the join-table relation. That is actually the reasonwhy this is just a warning and not an error.
You actual issue, that inserting Package.PackageSites.Add(packageSite) does not work, is probably caused by another setting. You should check the 'Managed' setting of your association endpoints, the IList<T> navigation properties in the designer. If you would like to be able to insert from both sides of the association, you should have both of those members marked with Managed=true. This is valid only if my assumption is true, that by "does not work", you mean that no data is inserted in the join table. If there is an exception on insert, than the reason is probably different and will need further investigation.
the Telerik team
Sharpen your .NET Ninja skills
! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>