Page 1 of 1

Doubt about object / class TMappedEntity

Posted: Fri 08 Sep 2017 21:07
by rafaelgalle11
Hello

I would like to know if it is possible to populate an object without it being inherited from TMappedEntity

Ex. TTeste = class
end;

When taking the TMappedEntity I miss the possibility of doing the Register procedure; override;

And it is also not possible to use getentities to populate the object list because this function requires a class of type TMappedEntity.
FContext.GetEntities <TContabilidadeEntityE>;

Re: Doubt about object / class TMappedEntity

Posted: Tue 12 Sep 2017 07:54
by MaximG
You can work with objects without using inheritance from the TMappedEntity class.
This model in EntityDAC is called the Attribute-mapped Objects Model. The principles of working with such model are covered in our documentation : https://www.devart.com/entitydac/docs/? ... tities.htm
To work with objects, which are not descendants of TEntity, there is the TObjectContext class in EntityDAC :
https://www.devart.com/entitydac/docs/? ... ontext.htm
The samples of using this class are presented in Demo distributed with EntityDAC