[sqlalchemy] Date only (no time stamp) selects not working with datetime/mx.DateTime objects

2007-09-22 Thread Patrick McKinnon
I used to be able to select from a mysql date column using a datetime object; where the timestamp would be ignored because the DB schema isn't using the datetime column type. query = Table.query().filter(Table.c.date == datetime(2007, 1, 1)) The mysql log shows the select being generated like

[sqlalchemy] Re: Cant locate any foreign key columns in primary join condition (one-to-many tree)

2007-07-09 Thread Patrick McKinnon
, Michael Bayer [EMAIL PROTECTED] wrote: On May 24, 2007, at 10:02 AM, Patrick McKinnon wrote: sqlalchemy.exceptions.ArgumentError: Cant locate any foreign key columns in primary join condition 'attribute.child_id = child.id AND child.parent_id = parent.id' for relationship 'Parent.attributes

[sqlalchemy] Cant locate any foreign key columns in primary join condition (one-to-many tree)

2007-05-24 Thread Patrick McKinnon
Hi Everybody, New to the forum. I'm having a problem setting up a relation. In this hypothetical example, I have a tree with one parent having many children, and each child having many attributes. I want to create a relation where each Parent has a list of all attributes that any of it's