<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thierry Florac wrote:
<blockquote
 cite="mid:20100129171632.114a6e5a@m03089.branche00.arbre.foret.onf.fr"
 type="cite">
  <pre wrap="">Le vendredi 29 janvier 2010,
  Vladislav Vorobiev <a class="moz-txt-link-rfc2396E" href="mailto:vavvav@mykniga.de">&lt;vavvav@mykniga.de&gt;</a> a écrit :
======================================================================
...

  </pre>
  <blockquote type="cite">
    <pre wrap="">Thierry thank you  for answer but it doesn't help.

I implement all what you sad. I tried with normal “list” and than 
swiched to “PersistentList”

code looks like that:

from persistent.list import PersistentList
import transaction

&lt;snip&gt;

myList=PersistentList([self.context.pfad, 'object])           
myList[0] = PersistentList([self.context.pfad, 'object])[0]  #hope I 
anderstud you right

ob.refList= myList 
ob._p_changed = True
ob.refList._p_changed = True 
self.context._setObject(id, ob)

After add I call again:

ob._p_changed = True
ob.refList._p_changed = True 
transaction.commit()

I see the commitet trunsactions in ZMI

The same problem. After restart ist the Attribut not in context.

For example return's

Before restart: ***1
ob.refList[0].objectValues()[0].absolute_url()
/pfad/object/FirstObjectOfReferencedObject

After restart only the id of the object:
ob.refList[0].objectValues()[0].absolute_url()
FirstObjectOfReferencedObject

Here is a place for an other question:

Normaly  self.absolute_url() returns url with hostname,  
(<a class="moz-txt-link-freetext" href="http://localhost/bla/bla">http://localhost/bla/bla</a>)
but already befor restart I get without <a class="moz-txt-link-freetext" href="http://localhost/">http://localhost/</a>... see ***1

It seem's that I forgot something.  I would be glad to if somebody 
explain me this problem.
    </pre>
  </blockquote>
  <pre wrap=""><!---->======================================================================

In fact I'm not really sure to understand your data structure and it's
goals...
Could you explain me what you want to do ??

Thierry
  </pre>
</blockquote>
I want to set some references from object to another object through. I
try to explain this with example classes.<br>
<br>
Example with two classes:<br>
<br>
#Create classes<br>
&gt;&gt;&gt;class School:<br>
&gt;&gt;&gt;   pass<br>
<br>
&gt;&gt;&gt;class People:<br>
&gt;&gt;&gt;   pass<br>
<br>
#Create objects<br>
&gt;&gt;&gt;p=People()<br>
<br>
&gt;&gt;&gt;s0=School()<br>
&gt;&gt;&gt;s0.name="Konrad School"<br>
<br>
&gt;&gt;&gt;s1=School<br>
&gt;&gt;&gt;s1.name="Leopold School"<br>
<br>
Now I set the referece<br>
<br>
&gt;&gt;&gt;p.school1=s0<br>
&gt;&gt;&gt;p.school2=s1<br>
<br>
Now I can access through the attribut to s0 and s1 objects:<br>
<br>
p.school1.name<br>
“Konrad School“<br>
<br>
This construction works persistent without problems.<br>
<br>
The idea is to put the references in a list.<br>
<br>
&gt;&gt;&gt;p.schools=[s0,s1]<br>
<br>
to access them <br>
<br>
&gt;&gt;&gt;p.schools[0].name<br>
“Konrad School“<br>
<br>
&gt;&gt;&gt;s1.name="Leo School"<br>
&gt;&gt;&gt;p.schools[1].name<br>
“Leo School“<br>
<br>
&gt;&gt;&gt;type(p.schools[1])<br>
&lt;type 'classobj'&gt;<br>
<br>
It works in zope without restart. If the server was restartet I get
some unwanted results. See my previews posts.<br>
The same effects I get with PersistentLists...<br>
<br>
I hope it is more  understandable.<br>
<br>
Thanks<br>
Vlad<br>
</body>
</html>