Hello,
I was expecting the following to work, because I have a faint
recollection of seeing it advertised on the list as fixed. Maybe my
brain is playing tricks on me?
psycopg2.ProgrammingError: null value in column "speedy_user_id"
violates not-null constraint
I'm using psycopg2-trunk and sqlalchemy-trunk
--- 8< ---
from sqlalchemy import *
class User(object):
# CREATE TABLE speedy_users
# (
# speedy_user_id SERIAL PRIMARY KEY,
#
# user_name VARCHAR NOT NULL UNIQUE,
# user_password VARCHAR NOT NULL
# );
pass
engine = create_engine('postgres://database=lbruno');
users_table = Table('speedy_users', engine, autoload=True);
assign_mapper(User, users_table)
u = User()
u.user_name = 'lbruno'
u.user_password = 'random'
objectstore.commit()
--- 8< ---
There's also the possibility I'm reading the docs wrong, of course.
Please flame me accordingly if so.
Thanks,
--lbruno
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users