[sqlalchemy] can't setup simple one to many relation

2008-01-29 Thread Max Ischenko
Hello, I'm struggling with a simple one to many relation, pls help! active_meetup = MeetupEvent(...) reg = MeetupRegistration(meeting=active_meetup) db.save(reg) *class 'sqlalchemy.exceptions.OperationalError': (OperationalError) (1048, Column 'meeting_id' cannot be null) u'INSERT INTO

[sqlalchemy] Re: can't setup simple one to many relation

2008-01-29 Thread Alexandre Conrad
Hello Max, AFAIR, I've had similar problems latelty when having a table with composite primary keys and running SQLite. I think Mike told me SQLite didn't support that. I'm no SQLite user, but I had this problem when I had to make a portable test case with SQLite in memory. If this can put

[sqlalchemy] Re: can't setup simple one to many relation

2008-01-29 Thread Max Ischenko
On 29 янв, 10:47, Alexandre Conrad [EMAIL PROTECTED] wrote: Hello Max, AFAIR, I've had similar problems latelty when having a table with composite primary keys and running SQLite. I think Mike told me SQLite didn't support that. I'm no SQLite user, but I had this problem when I had to

[sqlalchemy] Re: can't setup simple one to many relation

2008-01-29 Thread Alexandre Conrad
Then I don't know. :) Max Ischenko wrote: On 29 янв, 10:47, Alexandre Conrad [EMAIL PROTECTED] wrote: Hello Max, AFAIR, I've had similar problems latelty when having a table with composite primary keys and running SQLite. I think Mike told me SQLite didn't support that. I'm no SQLite user,

[sqlalchemy] Re: can't setup simple one to many relation

2008-01-29 Thread Max Ischenko
On Jan 29, 2008 3:46 PM, jason kirtland [EMAIL PROTECTED] wrote: The mapped backref is 'meetup' but the class's __init__ is setting 'meeting': Duh! Thanks a lot. Max. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: can't setup simple one to many relation

2008-01-29 Thread jason kirtland
Max Ischenko wrote: Hello, I'm struggling with a simple one to many relation, pls help! active_meetup = MeetupEvent(...) reg = MeetupRegistration(meeting=active_meetup) db.save(reg) *class 'sqlalchemy.exceptions.OperationalError': (OperationalError) (1048, Column 'meeting_id'

[sqlalchemy] Re: No attribute '_instance_key': Defining primary keys and surrogate primary keys

2008-01-29 Thread Phil Coombs
Works perfectly. Thanks again Michael. On 29 Jan, 20:13, Phil Coombs [EMAIL PROTECTED] wrote: Brilliant. Thanks for that lightning response, workaround and fix. I'll give the code a spin. On 28 Jan, 23:19, Michael Bayer [EMAIL PROTECTED] wrote: hi there - the bug is fixed in r4103,

[sqlalchemy] Re: No attribute '_instance_key': Defining primary keys and surrogate primary keys

2008-01-29 Thread Phil Coombs
Brilliant. Thanks for that lightning response, workaround and fix. I'll give the code a spin. On 28 Jan, 23:19, Michael Bayer [EMAIL PROTECTED] wrote: hi there - the bug is fixed in r4103, the test below will work as stated.  Or you   can stick with the workaround for now. On Jan 28, 2008,

[sqlalchemy] DPAPI Error

2008-01-29 Thread jon
Hi, I've written a small Pylons application to manage some data for a client. It's real basic CRUD stuff here, nothing fancy. I notice though that from time to time the client will try to add new data and she gets this error message: DBAPIError: (TypeError) expecting None or a string u'SELECT

[sqlalchemy] Re: DPAPI Error

2008-01-29 Thread Michael Bayer
On Jan 29, 2008, at 9:15 PM, jon wrote: Hi, I've written a small Pylons application to manage some data for a client. It's real basic CRUD stuff here, nothing fancy. I notice though that from time to time the client will try to add new data and she gets this error message: DBAPIError: