[sqlalchemy] Removing duplicates

2012-05-08 Thread Eduardo
Hi, Is there any function in sqlalchemy that filters out duplicates? For example the following rows satisfy a query: 1. (john, 23 , lpgh ) 2.(steve , 35 , dbr ) 3. (john ,76, qwe) 4. (mark, 35, epz) I would like that my query results contain only one row with john (either 1 or 3 which one is not

Re: [sqlalchemy] Removing duplicates

2012-05-08 Thread Ryan Kelly
On Tue, May 08, 2012 at 05:20:03AM -0700, Eduardo wrote: Hi, Is there any function in sqlalchemy that filters out duplicates? For example the following rows satisfy a query: 1. (john, 23 , lpgh ) 2.(steve , 35 , dbr ) 3. (john ,76, qwe) 4. (mark, 35, epz) I would like that my query

[sqlalchemy] Bug in joinedload('*') ?!

2012-05-08 Thread alex
Hi all, I want to use session.query(...).options(joinedload('*')) to load all related objects eagerly. It seems not to work if inheritance is involved. This is a complete working example using SQLAlchemy 0.7.7 and Elixir 0.8.0dev: - from elixir import * from sqlalchemy import

Re: [sqlalchemy] Bug in joinedload('*') ?!

2012-05-08 Thread Michael Bayer
When you eager load from a class to itself, this is a self-referential eager load.A generic lazy=joined needs to know the depth at which you'd like to go when this occurs, otherwise it will stop as soon as it sees itself in the path of classes to be joined.The behavior of

[sqlalchemy] Re: Bug in joinedload('*') ?!

2012-05-08 Thread alex
Hi, thank you so much for the quick reply. That's exactly what I need! FYI: I use '*' with joinedload for the following scenario: I want to export a certain object and all its related objects to a second sqlite database. In addition to the db file I also copy files from disk, which are