[Zope-dev] [Zope3-Users] Next Step to Bug Resolution???

Dan Korostelev nadako at gmail.com
Thu Dec 18 12:06:13 EST 2008


Hi, Tim.

I builded out your application and took a quick look at the error. It
looks like you're mis-using the zope.schema.Field class and its
interface. It should be only used in schema definition, while you are
using Field instances as attributes for other objects. For example,
you are defining the ObjectId as a field, but are using its instances
as objects. That's not a valid use.

I extracted the problematic code to separate file and changed the
IField to Interface and Field to ``object`` (though you'll want to use
Persistent, i guess) for ObjectId and ObjectRef and it works okay. :-)

Or, it might be that I don't fully understand your code and
application architecture, so I would like to hear more about it. It
looks quite over-engeneered to me.

-- 
WBR, Dan Korostelev


More information about the Zope-Dev mailing list