On Jan 23, 2006, at 2:50 PM, [EMAIL PROTECTED] wrote:
also curious why you have a separate step for
generating primary keys, since that behavior is built-in via
sequences or
"defaults".
hmm; i was having some issues with that
before, but you're right, it seems to
work without. i'm not sure what the
original problem was anymore.
i just hit the reason i was doing that
again during testing; it has nothing
to do with id sequences per se, and
only involves "degenerate" cases.
the following gives a syntax error
when ID_HACK = False.
---
import sqlalchemy as rdb
ID_HACK = True
rdb.mapping.objectstore.LOG = True
engine = rdb.create_engine('sqlite://', echo=True)
t1 = rdb.Table(
't1', engine,
rdb.Column('id', rdb.Integer, primary_key=True),
)
t1.create()
class C1(object):
pass
m1 = rdb.mapper(C1, t1)
x1 = C1()
if ID_HACK:
x1.id = 0
rdb.objectstore.commit()
-------------------------------------------------------
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