RE: [SQLObject] request for elaboration on code
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <jws...@ra...> - 2004-02-16 13:23:42
|
>> Firstly what is 'id' representing? > >It is an optional to give the ID parameter when creating an object, this is the >value to use if not expected to be auto-generated. So when I see 'id' I can think 'primary key'? I have specified the table name and primary key of my main table with _table and _idName, but I also have a foreign key to a validation table. Do I need to specify the primary key of the foreign table? What does that look like? Unlike the examples in the docs this is a many-to-one relationship. The validation table will not have an associated object. >DBs, Postgres provides no cursor-level way to retrieve auto-generated IDs. >There are alternatives to doing it by oid, such as pre-selecting the nextval >on the sequence, but using oids seemed to be the least intrusive to >SQLObject's design. I'm having a hard time getting my head around why SQLOject needs to do a select at all. I am trying to create an object- i.e. write a row. My data gets written to postgres as I expect, then I get this other error complaining about oid's not existing. |