delphi-orm icon indicating copy to clipboard operation
delphi-orm copied to clipboard

Classes connected by has_many relation have to be in the same class

Open GoogleCodeExporter opened this issue 10 years ago • 4 comments

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

GoogleCodeExporter avatar May 28 '15 13:05 GoogleCodeExporter

Original comment by [email protected] on 16 Aug 2012 at 8:51

  • Changed state: Accepted

GoogleCodeExporter avatar May 28 '15 13:05 GoogleCodeExporter

Is this problem still present?

Original comment by [email protected] on 1 Apr 2014 at 10:51

GoogleCodeExporter avatar May 28 '15 13:05 GoogleCodeExporter

I have this problem to.

Original comment by [email protected] on 20 May 2014 at 7:08

GoogleCodeExporter avatar May 28 '15 13:05 GoogleCodeExporter

How is this question ?

Original comment by [email protected] on 1 Sep 2014 at 2:39

GoogleCodeExporter avatar May 28 '15 13:05 GoogleCodeExporter