I found an error in the compilation of the project DORM_UnitTest.dpr for XE2
When I try to compile I get an error Incompatible type TPerson and TObject
I checked and found that the procedure that creates problems is the following.
Commenting on the highlighted line with>>> the project is compiled.
procedure TTestDORM.TestFindOne;
var
p: TPerson;
p1: TPerson;
begin
p := TPerson.NewPerson;
try
Session.Persist(p);
>>> p1 := Session.FindOne<TPerson>(TdormCriteria.NewCriteria('ID',
>>> TdormCompareOperator.coEqual, p.id));
try
CheckEquals(p.id, p1.id); // same data
CheckFalse(p = p1); // different objects
finally
p1.Free;
end;
finally
p.Free;
end;
end;
Original issue reported on code.google.com by mottadel...@gmail.com on 3 Jan 2012 at 11:39
Original issue reported on code.google.com by
mottadel...@gmail.com
on 3 Jan 2012 at 11:39