Hello list,
I don't think my brain is currently capable of figuring out the SQL
itself, let alone how to do it with SQLA.
I've got the following models:
City
Location
Item
Category
Location belongs to one of many Cities via simple Location.city_id
foreign key
Location belongs to one or
Hello.
Thank you for the tips. I stick to my simple approach for the time being:
_rows = q.all()
rows = unwrap(_rows)
I need the cache within the context of one method only.
Ladislav Lenart
Od: Michael Bayer mike...@zzzcomputing.com
On Sep 27, 2012, at 4:37 PM, Ladislav Lenart
Hello.
I am not at my development environment now so I cannot test it, but I think you
want this:
http://docs.sqlalchemy.org/en/rel_0_7/orm/inheritance.html?highlight=of_type#basic-control-of-which-tables-are-queried
Ladislav Lenart
PS: I'm by no means a DB or SQLA expert too :-)
Od: Iain
This is the right answer. if you query(Contact).with_polymorphic([Person,
Organization]), you can refer to Person.attribute and
Organization.attribute in your query. It will produce a LEFT OUTER JOIN
from contact to each of the related tables.
On Sep 28, 2012, at 7:05 AM,
Is there a good way to have a dialect automatically add casting to 'THEN'
expressions in 'CASE' statements?
I'm working on a dialect for the H2 database, via Jython. H2 requires
values in a 'THEN' expression to have explicit casts (see: Unknown data
type thrown with a case statement where all
On Sep 28, 2012, at 11:15 AM, Alex D. wrote:
Is there a good way to have a dialect automatically add casting to 'THEN'
expressions in 'CASE' statements?
I'm working on a dialect for the H2 database, via Jython. H2 requires values
in a 'THEN' expression to have explicit casts (see:
Roger that, thanks for the prompt response.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sqlalchemy/-/XU4Zfrz8KJQJ.
To post to this group, send email to
On Fri, Sep 28, 2012 at 7:06 AM, Michael Bayer mike...@zzzcomputing.comwrote:
This is the right answer. if you
query(Contact).with_polymorphic([Person, Organization]), you can refer to
Person.attribute and Organization.attribute in your query. It will
produce a LEFT OUTER JOIN from
I would really like to make a feature request for a `not_in_` operator for
sqlalchemy.sql.operators.ColumnOperators
there are at least 2 ways to make a valid query right now :
filter( ~ table.column.in_( (1,2,) ) )
filter( sqlalchemy.not( table.column.in_( (1,2,) ) )
so there isn't any
On Sep 28, 2012, at 1:54 PM, Jonathan Vanasco wrote:
I would really like to make a feature request for a `not_in_` operator for
sqlalchemy.sql.operators.ColumnOperators
there are at least 2 ways to make a valid query right now :
filter( ~ table.column.in_( (1,2,) ) )
filter(
On Sep 27, 2012, at 1:28 AM, Michael Kowalchik wrote:
Lets say I have object A that's in the cache and it has a relationship, A.B
that was stored along with it in the cache. If I retrieve A from the cache I
can get A.B and I get the cached copy of B. If B is modified, however, then
my
11 matches
Mail list logo