Moshe C. wrote:
>
> Weird, the first assertion already fails, but I am not using
> ScopedSession.mapper. See the code in the first post.
>
> On Jun 3, 11:28 pm, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
>> easy way to ensure things are working as expected:
>>
>> Moshe C. wrote:
>>
>> > In code:
>>
>> >         t = Model.Resume()
>> >         t.id = something
>>
>>           assert t not in Model.session

its not a full example.  no imports are illustrated including what
orm.mapper() might be doing.   There is obviously code which is setting up
Session.mapper() or otherwise code within Resume().__init__() doing
something similar.








>>
>>
>>
>> >    w = Model.session.query(Model.Workplace).filter_by(id=idd).first()
>>
>>           assert t not in Model.session
>>
>> >         # model.save(t)
>> >         model.save_or_update(t)
> >
>


--~--~---------~--~----~------------~-------~--~----~
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