I was reviewing the help file and found that was not necessary to inform the ForeignJoinColumn field, and that instead Aurelius is going to use the ID. Since all my tables are ID based with GUI that makes easier.
I have removed then all and they all look like this now:
[ManyValuedAssociation([TAssociationProp.Lazy], [])]
[ForeignJoinColumn('', [])]
FMeiosContato: Proxy<TList<TEntityMeiosContato>>;
However at first test (I am using ElevateDB) it created the following sql, that raised and erro on the database:
CREATE TABLE SYSPROFILEITEMS ('#$D#$A' ID GUID NOT NULL,'#$D#$A' ALLOW BOOLEAN,'#$D#$A' RESOURCETYPE INTEGER,'#$D#$A' RESOURCENAME VARCHAR(255),'#$D#$A' ROW INTEGER,'#$D#$A' COL INTEGER,'#$D#$A' GUID,'#$D#$A' CONSTRAINT PK_SYSPROFILEITEMS PRIMARY KEY (ID));
The problem is that GUID after the COL INTEGER, if I am not wrong. I don't have a column with that name, and have not defined any join with that name.
As soon as I have defined back again the ForeignJoinColumn name it generated correctly the sql.
That partial field created is generated based in a Join from other entities, since this particular entities does not reference any other, it is actually a pretty simple entity.
My table basic structure for the Id is this:
[Entity]
[Table('SYSPROFILEITEMS')]
[Id('ID', TIdGenerator.Guid)]
TEntitySystemProfileItems = class(TNaharEntity)
private
FId: TGuid;
[Column('ID', [TColumnProp.Unique, TColumnProp.Required, TColumnProp.NoUpdate])]
property Id: TGuid read FId write FId;
end;
Eduardo