I'm seeing (seemingly random) instances of sqlalchemy not returning an
object for a relation. It seems to think that the "<relation>_id"
column is None.

The code in question is available at
http://trac.mcs.anl.gov/projects/clusterbank/browser/trunk/source/packages/clusterbank/model

Thanks in advance.

~jonathon

Python 2.4.2 (#1, Apr 13 2007, 16:09:19)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from clusterbank.model import *
>>> Allocation.query.all()[0].resource_id
2007-11-30 14:07:43,495 INFO sqlalchemy.engine.base.Engine.0x..70
SELECT allocations.comment AS allocations_comment,
allocations.datetime AS allocations_datetime, allocations.start AS
allocations_start, allocations.expiration AS allocations_expiration,
allocations.amount AS allocations_amount, allocations.id AS
allocations_id, allocations.project_id AS allocations_project_id,
allocations.resource_id AS allocations_resource_id
FROM allocations ORDER BY allocations.id
2007-11-30 14:07:43,496 INFO sqlalchemy.engine.base.Engine.0x..70 []
3L
>>> Allocation.query.all()[0].resource
2007-11-30 14:07:14,310 INFO sqlalchemy.engine.base.Engine.0x..70
SELECT allocations.comment AS allocations_comment,
allocations.datetime AS allocations_datetime, allocations.start AS
allocations_start, allocations.expiration AS allocations_expiration,
allocations.amount AS allocations_amount, allocations.id AS
allocations_id, allocations.project_id AS allocations_project_id,
allocations.resource_id AS allocations_resource_id
FROM allocations ORDER BY allocations.id
2007-11-30 14:07:14,310 INFO sqlalchemy.engine.base.Engine.0x..70 []
2007-11-30 14:07:14,317 INFO sqlalchemy.engine.base.Engine.0x..70
SELECT resources.id AS resources_id
FROM resources
WHERE resources.id = %s ORDER BY resources.id
2007-11-30 14:07:14,317 INFO sqlalchemy.engine.base.Engine.0x..70
[None]
>>>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to