<span class="Apple-style-span" style="border-collapse: collapse; "><div><br></div></span><div><br><div class="gmail_quote">On Jan 27, 2008 3:31 PM, Darryl Cousins &lt;<a href="mailto:darryl@darrylcousins.net.nz">darryl@darrylcousins.net.nz</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">On Sun, 2008-01-27 at 13:03 -0500, Stephan Richter wrote:<br>&gt; On Friday 21 December 2007, Darryl Cousins wrote:<br>
&gt; &gt; I find that when I map a class to a table I lose the auto-magic<br>&gt; &gt; vaidation provided by FieldProperty when setting attributes.<br>&gt;<br>&gt; I bet you that sqlalchemy does some evil class hacking. Actually, I gotta<br>
&gt; check this out. :-) Yeah, from looking at the mapper.py module, I can see<br>&gt; that really weird things happen there. They overwrite attributes left and<br>&gt; right. Man, I love persistent! I wish they would have used it as a base for<br>
&gt; their work.<br><br></div>Hi Stephan,<br><br>Thanks for your comment.<br><br>Just yesterday I was looking at a couple of external sqlalchemy<br>projects: Elixir [1] and sqlalchemy-validations [2]. I only had a brief<br>
look through the code but the way sqlalchemy-validations hooks itself<br>into Elixir seemed point to a way to hook zope fieldproperty in there.<br>Maybe. ;-)<br><br>[1] <a href="http://elixir.ematia.de/trac/" target="_blank">http://elixir.ematia.de/trac/</a><br>
[2] <a href="http://code.google.com/p/sqlalchemy-validations/" target="_blank">http://code.google.com/p/sqlalchemy-validations/</a><br></blockquote></div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; "><div>
forget to reply all to the list..</div><div><br class="webkit-block-placeholder"></div>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.</span><div>
<span class="Apple-style-span" style="border-collapse: collapse; "><br class="webkit-block-placeholder"></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">cheers,</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; "><br class="webkit-block-placeholder">
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">kapil</span></div></div>