On Oct 27, 2008, at 12:19 PM, Matthias wrote:

>
> Hi,
> i have a problem regarding inheritance. I use joined table
> inheritance. Assume the classes parent, child1 and child2. The
> parent_table has a field 'type'. I have to use
> 'session.query(child1).from_statement(deliver_me_parents_with
> special_conditions).all()' - the result contains child1 and child2
> objects. The documentation says sth. about bypassing all other stuff,
> but my description was just a model for my problem, i can not do
> anything like "type=child1" in the statment, cause there is a deeper
> inheritance structure.
>
> Summary: I have a result set of 'parents' but i want to get only the
> child1 objects. The result of 'from_statement' contains the type-
> column, so SQLAlchemy should be able to resolve the child1 objects?
>

it should.  is child2 a subclass of child1 ? 
  

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