On Fri, May 4, 2018 at 9:49 PM, Dave von Umlaut <zedrd...@gmail.com> wrote:

> Also… Not sure if that's related, but I also seem unable to implement
> is_latest_version with a nicer join-based query (I suspect solving my Alias
> issues might help):
> … FROM child c1 JOIN child c2 ON c2.id = c1.id AND c2.version > c1.version
> WHERE c2.id IS NULL

you can of course write that query using query.join() directly but the
column_property() can't change the query to have a JOIN in the FROM
clause automatically.   persisting the is_current_version value might
be overall easier.

>
>
> Thanks in advance for any help!
> --
> Dave
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full
> description.
> ---
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to