strak2015 / delphi-orm

Automatically exported from code.google.com/p/delphi-orm
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 avo.muro...@gmail.com on 11 Feb 2012 at 12:37

GoogleCodeExporter commented 8 years ago

Original comment by daniele....@gmail.com on 16 Aug 2012 at 8:51

GoogleCodeExporter commented 8 years ago
Is this problem still present?

Original comment by daniele....@gmail.com on 1 Apr 2014 at 10:51

GoogleCodeExporter commented 8 years ago
I have this problem to.

Original comment by christop...@gmail.com on 20 May 2014 at 7:08

GoogleCodeExporter commented 8 years ago
How is this question ?

Original comment by henrique...@gmail.com on 1 Sep 2014 at 2:39