[SQLObject] Hi guys. Please, I need help
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: fingerclick <fc...@bo...> - 2004-04-21 18:30:41
|
I´d like to put in one table two references do a same table. Does sqlObject allows that? Or may i build the sql in another way to make that works? db_login has the names and db_request has 2 fields that point to db_login( these fields are the persons id ).Thanks in advance. The tables: CREATE TABLE db_login ( id SERIAL PRIMARY KEY, login TEXT NOT NULL, password TEXT NOT NULL, ativo BOOLEAN DEFAULT true, name TEXT ); CREATE TABLE db_request ( id SERIAL PRIMARY KEY, new_file BOOLEAN DEFAULT true, db_request_id INTEGER NOT NULL REFERENCES db_login (id), db_source_id INTEGER NOT NULL REFERENCES db_login (id), ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); |