delphi-orm
delphi-orm copied to clipboard
Classes connected by has_many relation have to be in the same class
What steps will reproduce the problem?
1. Put classes TPerson and TLaptop (from the example project) to different
units and change mapping file accordingly.
2. Call TSession.LoadRelations with an instance of TPerson object.
What is the expected output? What do you see instead?
I get an exception with message "Unknown type TLaptop" which shouldn't happen.
What version of the product are you using?
Latest as of February 11th, 2012.
Please provide any additional information below.
The problem seems to be in TSession.LoadHasManyRelationByPropertyName method,
where _table is the mapping of parent class, but is used for finding child
class type.
Same problem occurs with belongs to relation as well and by looking at the
code, I would presume that it's the same for has one relation (but I haven't
tested it yet).
Original issue reported on code.google.com by [email protected] on 11 Feb 2012 at 12:37