On Sat, Apr 23, 2011 at 08:06:50PM -0600, Pгoм???тн?????s 0x01 wrote:
> Another newbie question: is it possible to override the *.by<AltID> method?
It's hard 'cause .by* methods are created on the fly, not via
inheritance.
> I have a custom encoding for that column (it is in base64), and I can't call
> it naturally unless I can override the method. Writing my own method doesn't
> seem to work -- it doesn't get called at all!
In this case you should rather create a validator that will encode
and decode your data. Similar to what HashCol does - see the source in
sqlobject/include/hascol.py. Validators work for all methods.
Oleg.
--
Oleg Broytman http://phdru.name/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been
demonstrated beyond question. Learn why your peers are replacing JEE
containers with lightweight application servers - and what you can gain
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss