[sqlalchemy] Mapping views as Table/ORM

2013-08-09 Thread temp4746
It seems that SQLAlchemy has no support for creating views by a View construct or something like that but you can map them as a Table or even an ORM class when applicable, and query from them, the problem is that SQLAlchemy will than try to create them as a new table when you issue

Re: [sqlalchemy] Mapping views as Table/ORM

2013-08-09 Thread Werner
On 09/08/2013 10:55, temp4...@gmail.com wrote: It seems that SQLAlchemy has no support for creating views by a View construct or something like that but you can map them as a Table or even an ORM class when applicable, and query from them, the problem is that SQLAlchemy will than try to create

Re: [sqlalchemy] Boolean Mapper property from exists subquery

2013-08-09 Thread Michael Bayer
On Aug 8, 2013, at 7:47 PM, askel dummy...@mail.ru wrote: Hello everyone, I've been using SQLAlchemy for a while and it's been a pleasure. But sometimes I feel I can get a little more from it or do something more properly. For instance, imagine two tables with one-to-one relationship

[sqlalchemy] Creating one-to-many relationship: child class returns empty list after trying to enter data

2013-08-09 Thread csdrane
This is driving me a little crazy so hopefully someone here can help. This is my first time working with sqlalchemy (v0.8). Python is v2.7.2 and MySQL is v14.14. The (heavily) summarized code is as follows: class Price(Base): __tablename__ = prices id = Column(Integer, primary_key =

[sqlalchemy] update using query - joint table inheritance

2013-08-09 Thread Mark Eastwood
Hi all, I am getting some unexpected behaviour when trying to update selected rows from a query when using joint table inheritance. Using MySQL, a query that is filtered based on items in the parent table, does not honour this filter when updating items in the child table (all children are