I have a situation wherein a change made to an attribute(a list) of a ZODB obj, is not being recognized.I have set the _p_changed = 1.<br>But still the ZODB doesnt recognize the change.On debugging i realised that the obj has the change and then i do a transaction.commit() and close the database.But on reaccessing the database i realise that the change hasnt been registered.<br>
Could someone please help me out on this one<br><br>The code is ::::<br>s=open_zodb()<br>root=s[0]<br>if not root.has_key(&quot;Clubs&quot;):<br>    root[&quot;Clubs&quot;] = {}        <br>ClubRoot=root[&quot;Clubs&quot;]<br>
if not root.has_key(&quot;Managers&quot;):<br>    root[&quot;Managers&quot;] = {}        <br>ManagerRoot=root[&quot;Managers&quot;]<br>if not root.has_key(&quot;Players&quot;):<br>    root[&quot;Players&quot;]={}<br>PlayerRoot=root[&quot;Players&quot;]<br>
if not root.has_key(&quot;Count&quot;):<br>    root[&quot;Count&quot;] = {}        <br>CountRoot=root[&quot;Count&quot;]<br><br><br>club=findclubsbyname(ClubRoot, &#39;MI&#39;)<br><br><br><br>print club.Players<br>list=addplayers(PlayerRoot, CountRoot, &quot;b&quot;, 99, 100)<br>
PlayerRoot=list[1]<br>CountRoot=list[0]<br>player=findplayerbyname(PlayerRoot, &quot;b&quot;)<br>player.Club=club<br>playerset=[]<br>playerset.append(player)<br>playerset.append(player)<br>#club.Players.append(player)<br>
club.makeclubplayerassociation(playerset)<br>ClubRoot[club.ClubID]=club<br><br>root[&#39;Players&#39;]=PlayerRoot<br>root[&#39;Clubs&#39;]=ClubRoot<br><br>transaction.commit()<br>close_zodb(s)<br><br><br>//open_zodb() is a function which just opens connection to the databse.<br>
findclubsbyname returns a club object .<br>addplayers is a function which adds a player and returns PlayerRoot and CountRoot<br>findplayerbyname returns a player object<br><br>every club object has an attribte Players which is a list.<br>
<br><br><br>