On 03/08/2013 18:09, Michael Bayer wrote:
On Mar 8, 2013, at 5:31 AM, Julien Cigar <[email protected]> wrote:

Hello,

Shouldn't SQLAlchemy emit (at least) a warning when a window function is mapped 
with an orm.column_property(), marked deferred=True, and accessed without 
query.options(orm.undefer()) context (.. or maybe it's the role of the dev to 
call it in a non-deferred context?) ?

For example:

'row_number' : orm.column_property(
                sql.func.row_number().\
                over(partition_by=table['content'].c.container_id,
                     order_by=table['content'].c.weight.desc()),
                deferred = True
            )

will always return 1 in a deferred context ..
trying to catch that scenario seems a bit arbitrary to me, there's all kinds of SQL that 
won't "work" as a deferred column property, and how do we know that particular 
SQL is not what's intended ?



You're right .. it was a silly idea (:



--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to