Hello
I tried the use of where(e) but it fires the following error:
AttributeError: 'Query' object has no attribute 'where'
I tried with filter(e) instead and the query does not fire any error but
the result is not exactly what is expected. Here is the query:
e = session.query(Plant).\
I have managed to add the missing SQL part with the following query:
e = session.query(Plant).\
join(Article, Plant.articles).\
join(Catalogitem, Article.catalogitems).\
filter(
Catalogitem.marketingseason == marketingseason,
Plant.taxon_id == Taxon.id
).\
Hello.
This is the correct solution. I think you HAVE to specify the correlation
between the exists() subquery and the main query. But I am no SA expert.
I would suggest to add id (a sequence) as your primary key and use it as FK
everywhere. You can turn the current composite primary key into a
On Aug 8, 2013, at 2:02 AM, Etienne Rouxel rouxel.etie...@gmail.com wrote:
Hello
I tried the use of where(e) but it fires the following error:
AttributeError: 'Query' object has no attribute 'where'
sorry, I meant filter()
I tried with filter(e) instead and the query does not fire any
Ok, thank you very much, one more time!
And thank you to Ladislav Lenart as well.
Le jeudi 8 août 2013 15:33:58 UTC+2, Michael Bayer a écrit :
On Aug 8, 2013, at 2:02 AM, Etienne Rouxel
rouxel@gmail.comjavascript:
wrote:
Hello
I tried the use of where(e) but it fires the following
Hello
Long story cut short, I would like to know if it is possible to generate
a query with SQLAlchemy ORM such as the one below and how.
SELECT botany.taxon.id AS botany_taxon_id
FROM botany.taxon
WHERE EXISTS (SELECT 1
FROM botany.plant
JOIN product.article ON
On Aug 7, 2013, at 11:58 AM, Etienne Rouxel rouxel.etie...@gmail.com wrote:
Hello
Long story cut short, I would like to know if it is possible to generate a
query with SQLAlchemy ORM such as the one below and how.
SELECT botany.taxon.id AS botany_taxon_id
FROM botany.taxon