9 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: class-object-like at...
FromSent OnAttachments
Christopher Arndt25 Jan 2007 06:35 
Karl Guertin25 Jan 2007 07:34 
Christopher Arndt25 Jan 2007 07:39 
Karl Guertin25 Jan 2007 08:02 
Rick Morrison25 Jan 2007 08:16 
Michael Bayer25 Jan 2007 08:45 
Rick Morrison25 Jan 2007 08:49 
Michael Bayer25 Jan 2007 09:09 
Christopher Arndt25 Jan 2007 10:38 
Subject:[sqlalchemy] Re: class-object-like attribute lookup
From:Michael Bayer (mike@zzzcomputing.com)
Date:01/25/2007 08:45:32 AM
List:com.googlegroups.sqlalchemy

COALESCE....wow i need to read some SQL books again... :)

On Jan 25, 2007, at 11:17 AM, Rick Morrison wrote:

You could do this in a single join using COALESCE on the "fallback" columns.

On 1/25/07, Karl Guertin <gray@gmail.com> wrote:

On 1/25/07, Christopher Arndt <chri@web.de> wrote:

It doesn't need to be recursive, just a two-level parent-child relation. And I don't want to add any columns, so I was thinking that table inheritance is not the right approach, but I'm not sure about that.

I was thinking that you could check parent_id for null or not null and map that way, but it doesn't look like the polymorphic mapper can handle that. Ah well.