My Fault,
session.merge(obj, load=False) should be
obj=session.merge(obj, load=False)
2010/4/17 Paul Balomiri :
> Hi,
>
> I was just trying to load a relation ( obj.predecessor) for obj.
> obj was created in a session, which has been committed, and closed afterwards.
> I merged obj to the ses
actually, this is exactly what i didn't want to do .. at least not
explicitly. thx.
On Jan 17, 3:24 am, Laurent Rahuel wrote:
> Hi,
>
> Did you first load the entry to update into the session or do you
> always create new objects to be saved ?
> I guess you need to:
>
> 1 - try to get the reco
thanks. i'll give it a shot.
On Jan 17, 10:43 am, Michael Bayer wrote:
> On Jan 17, 2009, at 4:07 AM, n00b wrote:
>
>
>
>
>
> > greetings,
>
> > i'm batch processing xml documents to mysql using SA 0.5, ORM.
>
> > data extracted from xml docs may be new or an update in form of a
> > replacement
On Jan 17, 2009, at 4:07 AM, n00b wrote:
>
> greetings,
>
> i'm batch processing xml documents to mysql using SA 0.5, ORM.
>
> data extracted from xml docs may be new or an update in form of a
> replacement of
> the existing object (record). (one of the columns, product_id, is
> unique=True). He
Hi,
Did you first load the entry to update into the session or do you
always create new objects to be saved ?
I guess you need to:
1 - try to get the record from the database using the product_id or
another unique field
2 - if the result set is not empty,
update the record using value
I modified the test to run against UnitTest since I dont have nose
installed, and all tests pass for me. My version is attached. Make
sure you're actually running 0.5 since the test seems to be testing
behavior that didn't work in older 0.4 versions of SQLA (although the
other tests seem
On Apr 30, 2008, at 11:24 PM, Rick Morrison wrote:
> right, sorry, before_insert
yeah if the INSERT is happening, and its in _save_obj(), the
before_insert is there. theres no "insert the row but dont call
before_insert" going on. Can you dig into it some more ?
--~--~-~--~
is not being called. as you call tell, I'm having trouble with the
keyboard tonight. first message was a typo,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email
right, sorry, before_insert
On Wed, Apr 30, 2008 at 11:18 PM, Michael Bayer <[EMAIL PROTECTED]>
wrote:
>
>
> On Apr 30, 2008, at 10:47 PM, Rick Morrison wrote:
>
> > I just started using session.merge, and I noticed that on
> > session.flush(), the before_update mapper extension for the objects
On Apr 30, 2008, at 10:47 PM, Rick Morrison wrote:
> I just started using session.merge, and I noticed that on
> session.flush(), the before_update mapper extension for the objects
> that have been merged into the session are not called.
>
> These are new instances, not previously persisted.
10 matches
Mail list logo