Hi,
While performing the example listed in the docs (Mapping a Class with
Table Inheritance) i was unable to get the mapping to work correctly. Is
this because it is unimplemented, or am I missing something?
>>> a = AddressUser()
>>> objectstore.commit()
select nextval('addresses_address_id_seq')
{}
INSERT INTO addresses (address_id, user_id, street, city, state, zip)
VALUES (%(address_id)s, %(user_id)s, %(street)s, %(city)s, %(state)s,
%(zip)s)
{'city': None, 'address_id': 1L, 'user_id': None, 'zip': None, 'state':
None, 'street': None}
select nextval('users_user_id_seq')
{}
INSERT INTO users (user_id, user_name, password) VALUES (%(user_id)s,
%(user_name)s, %(password)s)
{'user_id': 1L, 'password': None, 'user_name': None}
>>> items = AddressUser.mapper.select()
SELECT addresses.city AS addresses_city, addresses.address_id AS
addresses_address_id, addresses.user_id AS addresses_user_id,
users.user_id AS users_user_id, addresses.zip AS addresses_zip,
addresses.state AS addresses_state, addresses.street AS
addresses_street, users.password AS users_password, users.user_name AS
users_user_name
FROM addresses JOIN users ON users.user_id = addresses.user_id
{}
>>> print 'List of addrusers: ', items
List of addrusers: []
Most notably the user_id was not set on the addresses table, and the
users row was created after the addresses.
Adam
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users