Re: [sqlalchemy] [Q][0.7.9] How to issue apply_labels() on an ORM query?

2013-05-31 Thread Andrija Zarić
On Friday, May 31, 2013 11:46:46 AM UTC+2, Ladislav Lenart wrote: Glad I could help, but I don't understand what is going on. Neither ticket description nor the patch itself helped me. Sorry. What is select_from() good for when it generates a cartesian query? What MIGHT help ME (a lot

Re: [sqlalchemy] [Q][0.7.9] How to issue apply_labels() on an ORM query?

2013-05-31 Thread Andrija Zarić
On Fri, May 31, 2013 at 12:31 PM, Ladislav Lenart lenart...@volny.czwrote: Hello. I've read the patch and the new documentation and i've learned about the existence of select_entity_from(). I was trying to say that the new documentation does not help me to understand the meaning / preferred

Re: [sqlalchemy] object has no attribute 'delete'

2010-04-13 Thread Andrija Zarić
http://www.sqlalchemy.org/docs/ormtutorial.html#deleting On 13 April 2010 11:12, jo jose.soa...@sferacarta.com wrote: Hi all, I'm trying migrate from 0.3 to 0.6 I don't know how to delete an object in the old version it was: My.get(1).delete() in 0.6: My.get(1).delete()

Re: [sqlalchemy] Re: Cannot delete SQLite '.db' using os.remove

2010-03-09 Thread Andrija Zarić
Your example runs fine on Ubuntu 9.04, with python 2.6.2 and SQLAlchemy-0.6beta1. On 9 March 2010 05:49, Lynton Grice lyntongr...@gmail.com wrote: Hi Michael, Can you paste the following code into your editor and try it out? Can you tell me what I would need to do to close the connections

[sqlalchemy] Re: How to order_by relation by another join?

2010-02-11 Thread Andrija Zarić
Thanks, Mike! Your example indeed works, but unfortunately when I add inheritance, mapper fails to generate proper (inherited) class: (I've changed code a little, so it represents more what I'm trying to do) from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative

Re: [sqlalchemy] Re: How to order_by relation by another join?

2010-02-11 Thread Andrija Zarić
On 11 February 2010 14:26, Michael Bayer mike...@zzzcomputing.com wrote: I'm assuming these are single-table inheritance mappers (I forgot about that add the column trick..) So yeah my solution was a quick hack and to continue in this way you'd have to build non-primary mappers for each of

[sqlalchemy] How to order_by relation by another join?

2010-02-10 Thread Andrija Zarić
Let's say I've got simple structure Order--Item--Detail. class Detail(Base): ... class Order(Base): ... class Item(Base): ... detail = relation(Detail, uselist=False, lazy=False) order = relation(Order, uselist=False, backref='items') Of course I can specify order_by for Order.items