From: SourceForge.net <no...@so...> - 2004-05-27 21:51:26
|
Bugs item #961879, was opened at 2004-05-27 14:51 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=505345&aid=961879&group_id=63836 Category: Output: CreateDBAPI Group: v0.2 Status: Open Resolution: None Priority: 8 Submitted By: Brandon King (kingb) Assigned to: Nobody/Anonymous (nobody) Summary: Retrieving associated object from a new, uncommited object. Initial Comment: Retrieving an associated object from a new, uncommited object spews warnings, like the following: SELECT * FROM "attribute_value" WHERE "gene_fk" = None ERROR: column "none" does not exist It's trying to do an SQL query based on the objects primary key, which hasn't been created yet as it has not been committed. If this object had been commited, but didn't have an associated objects, it would return an empty list. I'd suggest that a new, uncommited object either return an empty list or throw an error of some sort. Example of problem: > myObj = dbs.MyObj() > myObj.getAssociatedObjects() SELECT * FROM "associated_object" WHERE "my_object_fk" = None ERROR: column "none" does not exist ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=505345&aid=961879&group_id=63836 |