I'm not sure this is it or not but FieldProperty doesn't play nice with the
persistent list and dict, it will only accept the non persistent list.
>>> class ITest(Interface):
... mylist = List(title=u'My List')
>>> class Test(Persistent):
... mylist = FieldProperty(ITest['mylist'])
>>> test = Test()
>>> test.mylist = PersistentList()
WrongType: (, <type 'list'>)
>>> test.mylist = list()
Instead of using FieldProperty, try to define it directly as a PersistentList
and see if that solves the problem.
On Wed, 14 Jun 2006 20:16:57 +0200, Marco Mariani wrote
> Marco Mariani wrote:
> > This creates the gadgets (one per each toy) but the Gadget.name
> > attributes, altough being created, are not persisted.
> I'd like to understand if what I was trying to do with my objects should
> "just work", or if I misunderstood something.
> Zope3-users mailing list
Zope3-users mailing list