Relationships for 2 tables


With Data Modeler was creates such relationships, main idea - user membership and group membership. User can be member of group and group can be member of group. Data Modeler allow this, after generating source code for Aurelius I'm got error for property ChildId - identifier redeclared.

    property MembershipId: Integer read FMembershipId write FMembershipId;
    property ChildId: TUsers read GetChildId write SetChildId;
    property ParentId: TGroups read GetParentId write SetParentId;
    property ChildId: TGroups read GetChildId write SetChildId;

This is bad construction? How to improve this? Should I create another table for GroupInGroup membership?

Or will it be easier to store both users and groups in one table?

I understand ChildId is a FK for both tables Users and Groups? That's not supported by Aurelius. You should have a FK for User and another for Group.


Ok, now I have such tables:

And Aurelius mapping result:

How I can improve this to get MembershipChildList and MembershipParentList, using this window I don't understand which list what return for me

Found that this is possible to change in General Settings

Correct Alex. Or you can simply type the name you want directly in the field "List property name"