On 26/02/2011 15:50, Michael Bayer wrote:
On 25/02/2011 17:13, Michael Bayer wrote:
can't reproduce. See attached. This test includes randomization of all key
data structures in the UOW which smokes out any issues in dependency sorting.
Okay, so after about an hour of stripping down code, please find attached a
minimal reproducible test case.
this is a simple mistake. This:
session.add(Grant(username=user.username))
is this:
x = Parent(id=1)
y = Child(parent_id=1)
--> commit
How is x.children to know that "y" is in any way related to x ?
The surprise for me is that the statements aren't executed in order.
I did session.add(user) before I did
session.add(Grant(username=user.username)), so why aren't the statements
executed in order?
More interestingly, why does the use of sessionmaker versus the use of
the standard Session class make a difference?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.