On Mon, Mar 30, 2009 at 5:30 PM, Michael Bayer <[email protected]> wrote:
>
> can you produce a small test case illustrating this ?

Sure, I'll do my best to produce one for you.

>  we have tests
> exercising merge() in conjunction with delete-orphan cascade but
> perhaps there is a bug here.     basically you're saying if a cbRecord
> with two cbPerson objects is merged, it fails.

Not exactly. My test passes when run on an empty database. On a scond
run, another test has already left one main record (CbRecord) with two
associated objects (two CbPersons) stored in the database. Now, when
the database is in this state, a test that tries to merge a CbRecord
with the same identity as the one in the database, only this time
having five CbPersons, two of which also have the same identity as
those in the database, SA raises an error and indeed has three new
objects that are not related to any parent, although the record given
to merge() and all its five persons ARE properly related to the
parent.

So I'll try to create a test that illustrates this for you as soon as
I can, and I'll post it back here.

Thank you for your great support, Mike, thank you for your time and
again, thank you for SA!
Yassen

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

Reply via email to