7 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: what happens on save?
FromSent OnAttachments
Eric Lemoine25 Apr 2008 08:37 
Michael Bayer25 Apr 2008 08:52 
Michael Bayer25 Apr 2008 08:55 
Eric Lemoine25 Apr 2008 11:47 
Eric Lemoine25 Apr 2008 13:20 
Michael Bayer25 Apr 2008 20:23.patch
Eric Lemoine28 Apr 2008 00:16 
Subject:[sqlalchemy] Re: what happens on save?
From:Michael Bayer (mike@zzzcomputing.com)
Date:04/25/2008 08:55:07 AM
List:com.googlegroups.sqlalchemy

On Apr 25, 2008, at 11:37 AM, Eric Lemoine wrote:

Hello

I have the following code in my pylons app:

refugee = Refugee(value, geometry) model.Session.save(refugee) model.Session.commit()

Refugee is the class mapped to my Table object (refugees_table). geometry is an instance of a custom type, for which I created a Geometry(TypeEngine) class.

In commit(), SQLAlchemy compares the geometry object to some other geometry object (yes, my Geometry class defines the compare_values method). I'd just like to know what object my geometry object is compared to? I'm just saving a new object in the db table so why there's a need to compare it to something else?

actually, it shouldnt be compared to anything. are you on 0.4 ?