the doc you mention explains it should be done like this:
mapper(PropertyClass, table,properties = {
'_hash' : table.c.hash
}
)
On Jul 15, 2006, at 6:01 PM, Jamie Wilkinson wrote:
> Hey,
>
> I'm trying to select on a property in my mapped object that I've
> overridden
> with a property, as per
> http://sqlalchemy.org/docs/
> adv_datamapping.myt#advdatamapping_properties_overriding
>
> However, session.query().select_by() throws an InvalidRequestError,
> it can't
> locate the property.
>
> Attached is a minimal test that reproduces it.
>
> My use case here is that I generate the hash at object creation
> time, and
> update the hash if any of the attributes change, and need to select
> by that
> hash because it becomes the secondary key for these objects.
>
> Thanks!
>
> (Also, is it possible for us bug reporting users to create accounts
> in the
> SA trac? The last few I did as guest but of course never got
> notified about
> your comments on the tickets)
> <sa-cant-locate-property.py>
>
> ----------------------------------------------------------------------
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Sqlalchemy-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users