2011/12/2 Michael Bayer <mike...@zzzcomputing.com>:
>
> On Dec 1, 2011, at 7:09 PM, Thierry Florac wrote:
>
>> 2011/12/2 Michael Bayer <mike...@zzzcomputing.com>:
>>>
>>> On Dec 1, 2011, at 5:38 PM, Thierry Florac wrote:
>>>
>>>> Hi,
>>>>
>>>> So it seems that when resources are in the form and NOT modified, the
>>>> matching task is not flagged "dirty" and is not saved in database. I
>>>> just don't understand why !!!
>>>
>>> Only a full usage example would make it clear in this case.    Again (like 
>>> another email) it sounds like objects are not necessarily attached to any 
>>> session in all cases.
>>
>> OK.
>> I'll check my code another time and will send you my full example on
>> tomorrow morning when I'll be back at work.
>> But as you say, how can I :
>> - check if an object is actually attached to a session ?
>> - if not (but how could it be ?), attach it to the session ??
>
> hopefully that will be all you need to debug, you can say "obj in session", 
> "obj in session.new", some info on this at 
> http://www.sqlalchemy.org/docs/orm/session.html#session-attributes
>

Hi,

My problem is solved !!
I checked my code and noticed that I was creating a new session in the
custom property handling resources assignment, instead of reusing the
session from which my object was loaded.
Everything is OK now, works like a charm ;-)

Best regards,
Thierry

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to