> I know that I could use a mapper extension for this (with before_insert,
> before_update, etc) but could it not be possible to do it with my
> @property ?

I think when SA apply the mapper (that is, assign), it overrides your property 
definition. You can ensure that by tracking if your property code is called.
 When I need to do that, I rename the original property in the mapper:

assign_mapper(Bla,blabla,properties=dict(_score=blabla.c.score))

and then deal with _score within the property code. One problem is now, your 
mapper doesn't have any score attribute, so your selects need to be aware of 
this and work with _score.

Hope that helps & cheers

Seb
-- 
Sébastien LELONG
http://www.sirloon.net
sebastien.lelong[at]sirloon.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to