On Apr 30, 2008, at 1:48 AM, kris wrote:

>
>> If I add a simple "correlate" feature to Query in 0.5, you can use  
>> the
>> raw Table object to bypass the ORM meaning of "Dataset" and "Base".
>> the query above is not quite complete but I can get an approximation
>> like this:
>
> Is this functionality available currently or am I waiting for
> sqlalchemy 0.5?
>
>
>>
>> So I think going forward, the concept of "use the Table objects
>> directly" when you want to bypass the higher level meaning of
>> "Dataset.id", i.e. that its selecting from a join of Dataset and  
>> Base,
>> might be a good way to go with this.
>
> Is there a branch (or trunk) that I should be using
>

0.5 is soon to be moved to trunk but is currently in the user defined  
state branch at 
http://svn.sqlalchemy.org/sqlalchemy/branches/user_defined_state 
  .   but yes being able to send column expressions into  
session.query() is a totally new thing.

in the UDS branch, I made some major changes to adjust for what you're  
trying to do.  Over there, if you create a Query using only the  
columns bound to a table, i.e. like mytable.c.somecolumn, no clause  
adaption occurs and no mapper definitions affect those expressions,  
meaning you can in fact hand-create joins across the individual tables  
in the inheritance setup regardless of how the inheriting mappers were  
configured (i.e. even if you told your inheriting mappers to by  
default load from a UNION).   Only class-bound properties, ie.  
MyClass.somecolumn, are subject to the "ORM" rules.   So in effect the  
Query can now act as a pure pass-through to select().




--~--~---------~--~----~------------~-------~--~----~
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