Hello ,
I'm having problems with the "Model (" attribute in class definition, if I specify a [Model (, when I try to update the database structure specifying the mapping TMappingExplorer.get ('.., the update is not performed.
Example:
Definition of classes
[Entity]
[Table ( 'RUOLI')]
[Model ( 'Work')]
[Sequence ( 'GEN_ID_RUOLI')]
[Id ('FId', TIdGenerator.IdentityOrSequence)]
TRuoliDTO = class
....
in the connection ....
DTOConnection: = AureliusConnection.CreateConnection;
DBManager: = TDatabaseManager.Create (DTOConnection);
OBJManager: = TObjectManager.Create (DTOConnection, TMappingExplorer.Get ('Work'));
if not DBManager.ValidateDatabase then
DBManager.UpdateDatabase;
DBManager.Free;
The structure is not updated,
but if i removing classes attribute [Model ('Work')]
and change the connection statment to
DTOConnection: = AureliusConnection.CreateConnection;
DBManager: = TDatabaseManager.Create (DTOConnection);
OBJManager: = TObjectManager.Create (DTOConnection);
if not DBManager.ValidateDatabase then
DBManager.UpdateDatabase;
DBManager.Free;
The update is successful,
Where do I make the mistake?
Best Regards!