On Mon, Feb 18, 2013 at 2:29 PM, Kiran Jonnalagadda <j...@pobox.com> wrote:
> > The trick is to override __init__ and set the value of the column to an > SQL expression that is evaluated database-side on commit. In my case, I'm > checking for the max value from existing instances that share the same > parent. In your case, it'll be instances that share the same date. > I try to keep my code free of any SQL expressions - in equal measure out a real lack of understanding SQL subtleties and to keep the code 'pure' ORM-ish. But this is definitely interesting and something I could try next time I need it. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers