Hello,
I'm trying to specify a propery name as Id for my entities:
[Entity]
[Table('t_users')]
[Model(STR_MODEL_SYSTEM)]
[Id('recno', TIdGenerator.IdentityOrSequence)]
TBTUser = class(TBTEntityBase)//, IEntityBase<TBTUser>)
private
[Column('recno', [TColumnProp.Required])]
Frecno: Aurelius.Types.Nullable.Nullable<Int64>;
{...}
public
property recno: Aurelius.Types.Nullable.Nullable<Int64> read frecno write frecno;
{...}
end;
The code above fails with this error:
Project WinEUR_entities_test.exe raised exception class EInvalidIdMemberName with message 'Invalid member name "recno" defined in Id attribute on class TBTUser.'.
If, howver, I change the Id attribute line to the following one, it works:
[Id('Frecno', TIdGenerator.IdentityOrSequence)]
Now, if I refere to this http://www.tmssoftware.biz/business/aurelius/doc/web/id.html I read:
AMemberName: Contains the name of field or property that identifies the object
So, why is it not working in my case ?
I need to reference the property and not the field for another class where I have many different entities that share the same structure and therefore all use the same ancestor class (not an entity: these are different data store in different, unrelated tables).