- attached sqlalchemy-properties.patch
PropertyLoader fails to respect entity_name of parent mapper
When using relation() properties with mappers that have entity_names, the relation fails to use the parent mapper's entity_name when establishing foreign key relationships, thus causing it to fail to find them in most cases.
Comments (5)
-
Account Deleted -
Account Deleted Raise by benno@jeamland.net, for response's sake. =)
-
repo owner actually i wouldnt say that should be the defined behavior, i.e. that the entity_name of a related mapper is assumed to be the same as that of the parent. i think thats kind of a surprise. i would think entity_name is more commonly applied to just a single mapper for a particular class that has more than one method of persistence, not an entire structure.
to create a relation to an entity_name mapper, you send the actual mapper to the relation() function instead of the class. sending the mapped class itself should produce the same result in all cases.
-
Account Deleted Ah, I see. I've reimplemented my code along these lines. This bug can be disregarded.
-
repo owner - changed status to wontfix
- Log in to comment
Patch to fix problem