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
Logged In: YES
user_id=552216
Okay, so a new uncommited object does return an empty list,
like I was expecting, but I don't think the warning message
should be shown in this situation as the SQL probably
shouldn't even be executed when PK = None.