PropertyLoader fails to respect entity_name of parent mapper

Issue #539 resolved
Former user created an issue

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)

  1. Mike Bayer 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.

  2. Former user Account Deleted

    Ah, I see. I've reimplemented my code along these lines. This bug can be disregarded.

  3. Log in to comment