[Zope3-Users] sqlalchemy and FieldProperty
kapil.foss at gmail.com
Wed Feb 13 07:52:17 EST 2008
On Jan 27, 2008 3:31 PM, Darryl Cousins <darryl at darrylcousins.net.nz> wrote:
> On Sun, 2008-01-27 at 13:03 -0500, Stephan Richter wrote:
> > On Friday 21 December 2007, Darryl Cousins wrote:
> > > I find that when I map a class to a table I lose the auto-magic
> > > vaidation provided by FieldProperty when setting attributes.
> > I bet you that sqlalchemy does some evil class hacking. Actually, I
> > check this out. :-) Yeah, from looking at the mapper.py module, I can
> > that really weird things happen there. They overwrite attributes left
> > right. Man, I love persistent! I wish they would have used it as a base
> > their work.
> Hi Stephan,
> Thanks for your comment.
> Just yesterday I was looking at a couple of external sqlalchemy
> projects: Elixir  and sqlalchemy-validations . I only had a brief
> look through the code but the way sqlalchemy-validations hooks itself
> into Elixir seemed point to a way to hook zope fieldproperty in there.
> Maybe. ;-)
>  http://elixir.ematia.de/trac/
>  http://code.google.com/p/sqlalchemy-validations/
forget to reply all to the list..
have a look at ore.alchemist property.py it wraps sqlalchemy descriptors
with validation ones from zope3, for use with a new mapper function
bind_mapper which adds in these validaton properties from an interface.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Zope3-users