Hi,

I have a column_property defined on a model with a select expression as 
explained in the examples 
in 
http://docs.sqlalchemy.org/en/latest/orm/mapper_config.html#using-column-property.
 
I had to add an extra condition to the where clause with a bindparam. I 
have also defined the column_property with the "deferred=True", so that the 
query is not fired in the first place. 

I am able to perform queries by using the "undefer" option in the query 
instance and also passing the param to the query. But when I create an 
instance of the model and flush and then try to access the column_property, 
the query tries to get fired and throws exception complaining about the 
bindparam value not being passed. 

Is there a way I can explicitly prevent the column_property query being 
fired for an object that is newly created. Or is there a way I can pass the 
param value for the bindparam when sqlalchemy loads the deferred 
column_property for the first time on the object.

Thanks
Mainak

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to