entityfieldRelation -- RelationStartFieldISFkSide ?

Posts   
 
    
bertcord avatar
bertcord
User
Posts: 206
Joined: 01-Dec-2003
# Posted on: 24-Jun-2004 00:35:29   

ok ....so I am still browsing a Project file using the State Browser...... and I have a question about entityfieldRelation objects. Specifically the RelationStartFieldISFkSide Property.

Under what circumstances would RelationStartFieldISFkSide be set to True?

Browsing the relations in the OrdersEntity (Northwind sample) I noticed that it was always set to False. At first I thought that maybe it was used with a 1:1 relation. Figured maybe in a 1:1 relation the two related entities would share the entityfieldRelation object. So I tried this, I added a new table to the database called ExtendedOrderInfo and created a 1:1 relation to Orders with the Orders table as the PK table.

I refreshed the project added the new entity and looked at both of the entityfieldRelation objects....but both are set to false as it appears that 2 entityfieldRelation objects are created.

Thanks for the help.

Thanks Bert

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39951
Joined: 17-Aug-2003
# Posted on: 24-Jun-2004 10:42:00   

That property is used in custom 1:1 relations. The problem with these was that fields in these relations don't have a IsForeignKey flag set nor a foreign key constraint is present. The interpreter couldn't figure out which side was the FK side so 1:1 relations were generated wrong. Because at creation time the designer knows which side is the FK side, a simple flag solved the problem simple_smile

Frans Bouma | Lead developer LLBLGen Pro