Re: [Sqlalchemy-users] Problem with column values when inserting

2006-01-15 Thread Michael Bayer
OK, I committed a small addition to assign_mapper that will create a default __init__ method, if one does not already exist on the given class. the below example works now. On Jan 15, 2006, at 3:37 AM, Murat Özsöyler wrote: Hi, Back from the long holidays, I've just checked out svn revisi

Re: [Sqlalchemy-users] Problem with column values when inserting

2006-01-15 Thread Robert Leftwich
Michael Bayer wrote: I think the keyword-enabled __init__() method created by assign_class () should be created within the sqlalchemy assign_mapper() method, if the given class doenst have an __init__() method defined already. that way code like this would work, if no other __init__() meth

Re: [Sqlalchemy-users] Problem with column values when inserting

2006-01-15 Thread Michael Bayer
I think the keyword-enabled __init__() method created by assign_class () should be created within the sqlalchemy assign_mapper() method, if the given class doenst have an __init__() method defined already. that way code like this would work, if no other __init__() method was already creat

Re: [Sqlalchemy-users] Problem with column values when inserting

2006-01-15 Thread Robert Leftwich
Murat Özsöyler wrote: The following code inserts a row with the values: ID=1, NAME=u''. m = trial2.Master(NAME="Deneme") trial2.objectstore.commit() If I comment out the default parameter for NAME column then I get this exception: Not sure where the 'trial2' comes from, but you need to

[Sqlalchemy-users] Problem with column values when inserting

2006-01-15 Thread Murat Özsöyler
Hi, Back from the long holidays, I've just checked out svn revision 817. Given the following module: from sqlalchemy import * engine = create_engine("sqlite://filename=trial2.sqlldb") MASTER = Table("MASTER", engine , Column("ID", Integer, Sequence("MASTER_ID_SEQ"), primary_key=True, nullab