On 5/23/15 11:52 AM, c.bu...@posteo.jp wrote:
Hi Mike,
thanks for your help.
On 2015-05-22 02:32 Mike Bayer mike...@zzzcomputing.com wrote:
if you copy an object to transient, now instance_state.key is gone,
next step is erase the primary key column-holding attributes, such as
myobject.id =
On 5/23/15 12:30 PM, c.bu...@posteo.jp wrote:
It cost me some time to analyse this problem. ;)
The problem in the pseudo-code below is that 'obj' lose the reference
to its foreign-key object (set with relationship()). The foreign key
member itself is still correct set with a numeric value.
I
Hi everyone!
I've found that contains_eager() does not load relation objects from query
in case when related model appears twice in query. The working code with
example models and steps to reproduce is listed in the attached file, I'll
briefly describe the issue here.
There are four models:
On 5/23/15 5:45 PM, Alex S wrote:
When I start printing some user's relations (u.preferences or
u.accounts), I've found that all data was load via q.all() call and
there are no additional queries in database. All data are loaded
except for u.preferences.current_account.preferences. Account
On 5/23/15 9:01 PM, Mike Bayer wrote:
The best I can do is that there's a patch that can make this work but
I definitely cannot commit it in 1.0; the eager loading mechanics are
extremely sensitive and easily messed up by even the most subtle
change, and I'd have to find time to think and
It cost me some time to analyse this problem. ;)
The problem in the pseudo-code below is that 'obj' lose the reference
to its foreign-key object (set with relationship()). The foreign key
member itself is still correct set with a numeric value.
I understand that this can happen because of the
On 2015-05-23 18:30 c.bu...@posteo.jp wrote:
I understand that this can happen because of the reference cycle
counting stuff in the background of SQLA. But how can I prevent this?
Maybe I should get into transaction handling with SQLA to prevent
problems like this. ;)
--
You received this
On 2015-05-23 18:30 c.bu...@posteo.jp wrote:
The problem in the pseudo-code below is that 'obj' lose the reference
to its foreign-key object (set with relationship()). The foreign key
member itself is still correct set with a numeric value.
I tried load_on_pending=True but this doesn't help
Hi Mike,
thanks for your help.
On 2015-05-22 02:32 Mike Bayer mike...@zzzcomputing.com wrote:
if you copy an object to transient, now instance_state.key is gone,
next step is erase the primary key column-holding attributes, such as
myobject.id = None. object on flush will have no PK value