Re: [sqlalchemy] SQLAlchemy 0.7 beta 1 released

2011-02-15 Thread Wichert Akkerman
Hi Mike, I grabbed SQLAlchemy from pypi when it was still there so I could do a quick test with my current projects (yay for buildout with version pinning). I'm happy to be able to report that the upgrade was seemless, and all my tests were passing with 0.7b1. Wichert. On 2/13/11 01:51 ,

Re: [sqlalchemy] Re: The right way to clear database of content?

2011-02-15 Thread Arve Knudsen
Thank you GHZ, it did work! Wondering about one thing though; the recipe in the documentation iterates over the tables in reverse sorted order, like so: for table in reversed(meta.sorted_tables) Do you know what this would be good for (since your code does not care about the table order)? Arve

[sqlalchemy] Re: The right way to clear database of content?

2011-02-15 Thread GHZ
I the order is required for Foreign Key relationships. i.e. to make sure the children are deleted before the parents. So the for table in reversed(meta.sorted_tables) example is the more correct way to delete all data. On Feb 15, 1:29 pm, Arve Knudsen arve.knud...@gmail.com wrote: Thank you

Re: [sqlalchemy] Re: The right way to clear database of content?

2011-02-15 Thread Arve Knudsen
Aha, thanks again! :) Arve On Tue, Feb 15, 2011 at 1:55 PM, GHZ geraint.willi...@gmail.com wrote: I the order is required for Foreign Key relationships. i.e. to make sure the children are deleted before the parents. So the for table in reversed(meta.sorted_tables) example is the more

Re: [sqlalchemy] Pypi release policy

2011-02-15 Thread Eric Lemoine
On Monday, February 14, 2011, Michael Bayer mike...@zzzcomputing.com wrote: On Feb 14, 2011, at 12:11 PM, Tarek Ziadé wrote: On Mon, Feb 14, 2011 at 6:00 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Feb 14, 2011, at 5:53 AM, Tarek Ziadé wrote: On Mon, Feb 14, 2011 at 11:44 AM,

Re: [sqlalchemy] Pypi release policy

2011-02-15 Thread Tarek Ziadé
On Tue, Feb 15, 2011 at 3:27 PM, Eric Lemoine eric.lemo...@camptocamp.com wrote .. But aren't apps supposed to use =0.6.99 to avoid backward compats issues? Apps that don't will also break when 0.7 final is on pypi. There are different things here: 1/ PyPI allows projects to publish any

Re: [sqlalchemy] Hybrid Property and func.sum()

2011-02-15 Thread Florian Mueller
Hey Thanks for the answers. I have a few follow-ups if you don't mind. Hi I'm confronted with the following situation: I have two entities: Account 1:n AccountEntry AccountEntry has a column (and property) 'amount'. Now I'd like to implement a @hybrid_property.expression 'balance' on

[sqlalchemy] Troubles with LEFT OUTER JOIN

2011-02-15 Thread Michael Hipp
Can someone help me understand why I can't seem to do a simple left outer join between these two tables: q = self.session.query(Car, Invoice.id_) q = q.outerjoin(Car, Invoice) sqlalchemy.exc.ArgumentError: Can't find any foreign key relationships between 'cars' and 'cars'.

Re: [sqlalchemy] Hybrid Property and func.sum()

2011-02-15 Thread Michael Bayer
On Feb 15, 2011, at 12:02 PM, Florian Mueller wrote: Hey Thanks for the answers. I have a few follow-ups if you don't mind. Hi I'm confronted with the following situation: I have two entities: Account 1:n AccountEntry AccountEntry has a column (and property) 'amount'. Now

[sqlalchemy] Is outerjoin() not generative?

2011-02-15 Thread Michael Hipp
This works: Seller = aliased(Dealer) Buyer = aliased(Dealer) q = self.session.query(Car, Seller.name, Buyer.name) q = q.outerjoin((Car.seller, Seller), (Car.buyer, Buyer)) This doesn't: Seller = aliased(Dealer) Buyer = aliased(Dealer) q =

Re: [sqlalchemy] Is outerjoin() not generative?

2011-02-15 Thread Michael Bayer
On Feb 15, 2011, at 5:21 PM, Michael Hipp wrote: This works: Seller = aliased(Dealer) Buyer = aliased(Dealer) q = self.session.query(Car, Seller.name, Buyer.name) q = q.outerjoin((Car.seller, Seller), (Car.buyer, Buyer)) This doesn't: Seller =

Re: [sqlalchemy] Pypi release policy

2011-02-15 Thread Eric Lemoine
On Tuesday, February 15, 2011, Tarek Ziadé ziade.ta...@gmail.com wrote: On Tue, Feb 15, 2011 at 3:27 PM, Eric Lemoine eric.lemo...@camptocamp.com wrote .. But aren't apps supposed to use =0.6.99 to avoid backward compats issues? Apps that don't will also break when 0.7 final is on pypi.