I have constructed a sample program consisting of two mapped classes (using sqlalchemy.ext.declarative) that have a relationship/ backref between them. At runtime the program does the following:
1) Print whether the parent class has an attribute for its relationship to the child (declared as the backref)
2) Construct a child object
3) Repeat step 1
The result (with SQLA 0.7.9) is that it prints 'False' during step 1 and then 'True' during step 3. I would expect True to be printed both times.
Here is the full source of the program:
Why does the property not exist when the first print statement executes?
Thanks for any guidance.