Hi,
After update to 4.18, i can not compile anymore with Delphi 10.3
...
fCriteria := TCriteria.Create(TClub, Manager);
...
[dcc32 Error] DB.Club.pas(88): E2010 Incompatible types: 'TEntityType' and 'class of TClub'
[dcc32 Error] DB.Club.pas(172): E2010 Incompatible types: 'TEntityType' and 'class of TClub'
It would be safer if you change your code, as you are using it in a way that is always subject to change/break. Manager.CreateCriteria is safer.
Is it feasible for you to change? Or, is it feasible to you to add a unit to uses clause to add a helper? This way a helper class could be created to add an overloaded Create. The equivalente code would be something like this:
constructor TCriteriaHelper.Create(Clazz: TClass; Manager: TMappingExplorer);
begin
Create(Manager.Explorer.EntityTypeFromClass(Clazz), Manager);
end;