[sqlalchemy] Re: column renaming and adding

2008-09-25 Thread Wim Verhavert
Thanks Michael! That's a good thing to know! On Thu, Sep 25, 2008 at 3:51 AM, Michael Bayer [EMAIL PROTECTED] wrote: On Sep 24, 2008, at 2:34 PM, Wim Verhavert wrote: How is this possible? I thought that by saying: properties={'achternaam':entity_tabel.c.naam} you actually rename

[sqlalchemy] column renaming and adding

2008-09-24 Thread Wim Verhavert
I have a setup like this: class Entity(object): pass class Persoon(Entity): pass entity_tabel = Table('contact', metadata, Column('contactid', Integer, primary_key=True), Column('voornaam', String(75)),

[sqlalchemy] Re: default values for columns in select mappers

2008-09-04 Thread Wim Verhavert
Thanks for the quick answers. But I'm left with some side-effect I'm a little bit struggling with: in order for this to work myObject and myOtherObject need to inherit some base class let's say 'entity'. Now the ones who created the database clearly didn't had much experience with databases (damn

[sqlalchemy] Re: default values for columns in select mappers

2008-09-04 Thread Wim Verhavert
is the python side of things is up to you. why is that entity base class bothering you? declare it just inheriting object without attributes, but dont use it.. or maybe i dont understand what u want.. wait for other replies. On Thursday 04 September 2008 11:22:08 Wim Verhavert wrote: Thanks

[sqlalchemy] Re: default values for columns in select mappers

2008-09-04 Thread Wim Verhavert
the relation.type... (assoc.object), i leave that to your exercise. plz do not expect the above to be THE solution, u may have to fix mistakes or tweak or even abandon ... read docs on inheritance, relations (many2many), and related. svil On Thursday 04 September 2008 11:57:35 Wim Verhavert

[sqlalchemy] default values for columns in select mappers

2008-09-03 Thread wim . verhavert
Hi all, I just started playing with SQLAlchemy today (after several years of plain SQL experience) and I must say I'm impressed. I'm reading my way through the docs now, but there is one thing I can't seem to find. Let me briefly explain the situation. I was given the task of rewriting a

[sqlalchemy] Re: default values for columns in select mappers

2008-09-03 Thread Wim Verhavert
Thanks! That's indeed the stuff I was looking for! On Wed, Sep 3, 2008 at 9:23 PM, Michael Bayer [EMAIL PROTECTED] wrote: On Sep 3, 2008, at 2:59 PM, [EMAIL PROTECTED] wrote: I have 1 table (mytable) which is structured somewhat like this: id = int (primary key) name = varchar() type =