Hello,

I try to save references to objects as attribute in a list.

object.refList=getattr([self.
context.pfad, 'object'],
[self.context.pfad, 'object1'])

After adding and transaction commit I can get my linked objects with
all attributes and methods

myObject.refList
[<myType at object>]

myObject.refList[0].objectValues()[0].getPhysicalPath()
('', 'path', 'object')

myObject.refList[0].objectValues()[0].absolute_url()
http://localhost/pfad/object

I restart the instance and get some other results

myObject.refList
[<myType at object>]

myObject.refList[0].objectValues()[0].getPhysicalPath()
('object',)

myObject.refList[0].objectValues()[0].absolute_url()
'object'

It seems that the in list referenced object ist no more in context
after restart.

the constructor for this looks like:

object  = myObject()
id=myObject
myObject.id   = id
myObject.title= id
myObject.refList=getattr([self.context.pfad, 'object'],
[self.context.pfad, 'object1'])
self.context._setObject(id, ob)

The references without list object.ref=objectreference working after 
restart.
Similar conducts Set und PersistentList.
Whats the problem anybody an idea? Can anybody reproduce the problem?

Zope2.12, python2.6

--
Best Regards
Vlad Vorobiev
_______________________________________________
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to