I'm using multi model design in combination with inheritance.
[Entity]
[Model('TenantDb'), Model('Dummy')]
[Inheritance(TInheritanceStrategy.SingleTable)]
[DiscriminatorColumn(csFldKind, TDiscriminatorType.dtString)]
TEntity = class
...
end;
[Entity]
[Model('TenantDb')]
[DiscriminatorValue('Child']
TEntityChild = class(TEntity)
private
// some fields
FAnotherEntityInDummy: Proxy<TAnotherDummyEntity>;
...
end;
Starting Server-App is executing
TDatabaseManager.Update() using Dummy-MapExplorer.
because these Entities are required building TenantDb MapExplorer.
These Entities are containing configs for dynamic properties.
TDatabaseManager.Update() is called using AllowDestructive false.
But because of missing TEntityChild in Dummy-Model my foreign key defined for FAnotherEntityInDummy will be removed every time.
All fields are not removed because of AllowDestructive is false.
How could I fix my model?
I could not add TEntityChild to Dummy because there are a lot of Associations and Many-Valued Associations that are not required for Dummy-Model.