Doubt about object / class TMappedEntity

Discussion of open issues, suggestions and bugs regarding EntityDAC
Post Reply
Posts: 2
Joined: Wed 06 Sep 2017 20:36

Doubt about object / class TMappedEntity

Post by rafaelgalle11 » Fri 08 Sep 2017 21:07


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

Ex. TTeste = class

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>;

Devart Team
Posts: 1257
Joined: Mon 06 Jul 2015 11:34

Re: Doubt about object / class TMappedEntity

Post by MaximG » Tue 12 Sep 2017 07:54

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 : ... tities.htm
To work with objects, which are not descendants of TEntity, there is the TObjectContext class in EntityDAC : ... ontext.htm
The samples of using this class are presented in Demo distributed with EntityDAC

Post Reply