Michael Bayer posted this on gmane.comp.python.sqlalchemy.user:

> should have this fixed in changeset 1679

It works like a charm now :) Thanks a lot, Mike, your support is
impressive!

> its better if you dont use add_property btw, i noticed you were using  
> a property "Name" which you mean to be "name"....because of  
> add_property, the People class had both.  if you do it this way, it  
> just has one of them:

In fact, I usually define the keys in the tables with the same name as the
properties, because in the past this code failed:

mapper(Originals, table_originals, order_by=Originals.order, properties={
    'title': table_originals.c.TheTitle
}

I usually end up doing:

table_originals = Table('Originals', metadata,
    Column('Title',     String(200),    key='title', nullable=False),
    ...
    )

Anyway, the reason of using add_property() is that in the past, when I
tried to define the properties directly on the mapper creation, I ended
up with errors, first some mappers could not be created and then some
properties sort of triggered the creation of a primary mapper on the class
which is not the one I define, so I chose to create them all at once (with
assign_mapper() calls) and then fill its properties.

With the improvements in mapper compilation, could I now define the
properties in the same time I do the assign_mapper() call?

An last but not least, thanks a lot for your patience and support. The
software is remarkable and your support and kindness wonderful :)

Regards,


Raul Garcia.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to