cubicweb #1947456 ORM should not try to re-fetch initiator relation/entity [open]
Considering the following schema: class Person(EntityType): lastname = String() works_for = SubjectRelation('Company', cardinality='1*') class Company(EntityType): name = String() the following entity classes: class Person(AnyEntity): fetch_attrs = ('lastname', 'works_for') class Company(AnyEntity): fetch_attrs = ('name',) and the following ORM query mycompany.reverse_works_for, the generated RQL will be (approximatively): Any X,AA,AB,AC WHERE E eid %(x)s, X works_for E, X lastname AA, X works_for AB?, AB name AC In that case, the originator relation/entity (i.e. E/works_for) should not be considered by the ORM and the RQL query should be something like: Any X,AA WHERE E eid %(x)s, X works_for E, X lastname AA | |
priority | normal |
---|---|
type | enhancement |
done in | <not specified> |
load | 0.250 |
load left | 0.250 |
closed by | <not specified> |
Comments
-
2011/09/22 10:28, written by acampeas
-
2011/09/22 10:34, written by adimascio
add commentPerson.fetch_attrs = ('lastname', 'works') ?
works_for of course.