Well, sorry, for the previous mail, because i was answer from my cel phone..<br><br>The problem is that:<br><br>When you works with a proxy, the proxy collaborators isn`t in the proxy.. the collaborators are in the ObjectTransatcion.. in the UnitOfwork in the Session. And the RealObject Structure and changes is in Mementos dictionary in  ObjectTransatcion.<br>

In Addition The Proxies has attached the Session.. <br><br>Yes, you right.. in you previous mail.. <br><br>but for reattaching you need copy the mementos and proxies collaborators from ObjectTransaction to new Session...<br>
and change the session from all proxies..<br>
<br>ufff.. too much work.. :) ..<br><br>i don&#39;t kwon how much cost for refresh object (with the unnecessary DB Read), but in the most of case, is cheaper use the refresh method or maintain live the GlorpSession.<br><br>
if you want solve this problem.. be my guest.. but i suggest, wait for new GlorpDBX  version (coming soon) and  write first to Alan Knight in core glorp list.. He can give better support than me.<br><br>Best<br>D.<br><br>
<div class="gmail_quote">On Fri, May 20, 2011 at 11:00 AM,  <span dir="ltr">&lt;<a href="mailto:diogenes.moreira@gmail.com" target="_blank">diogenes.moreira@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You must use GlorpSession&gt;&gt;refresh: anObject to attach anObject to new Session<br>
<br>
Best.<br>
D<br>
Enviado desde mi BlackBerry® de Claro Argentina<br>
<br>
-----Original Message-----<br>
From: Panu Suominen &lt;<a href="mailto:panu.j.m.suominen@gmail.com" target="_blank">panu.j.m.suominen@gmail.com</a>&gt;<br>
Sender: <a href="mailto:squeakdbx-bounces@lists.squeakfoundation.org" target="_blank">squeakdbx-bounces@lists.squeakfoundation.org</a><br>
Date: Fri, 20 May 2011 10:51:38<br>
To: The complete and open-source solution to relational database access&lt;<a href="mailto:squeakdbx@lists.squeakfoundation.org" target="_blank">squeakdbx@lists.squeakfoundation.org</a>&gt;<br>
Reply-To: <a href="mailto:panu.suominen@iki.fi" target="_blank">panu.suominen@iki.fi</a>,<br>
        The complete and open-source solution to relational database access<br>
        &lt;<a href="mailto:squeakdbx@lists.squeakfoundation.org" target="_blank">squeakdbx@lists.squeakfoundation.org</a>&gt;<br>
Subject: [SqueakDBX] Should &quot;GlorpSession&gt;&gt;register:&quot; work?<br>
<div><div></div><div><br>
We have problem with reattaching objects to new session.<br>
<br>
Following code throws exception telling that connection is not open.<br>
|person|<br>
KLDatabase withSession: [:s|<br>
        person := s readOneOf: KLPerson where: [:p| p id = 6127].<br>
].<br>
<br>
KLDatabase withSession: [:s|<br>
        s inUnitOfWorkDo: [<br>
                self halt.<br>
                s register: person.<br>
                Transcript show: person parameters.<br>
        ]<br>
].<br>
<br>
The problem seems to be that &quot;GlorpSession&gt;&gt;register:&quot; does not check<br>
if there is an Glorp proxy inside the object being registered.<br>
Tutorial (<a href="http://www.eli.sdsu.edu/SmalltalkDocs/GlorpTutorial.pdf" target="_blank">http://www.eli.sdsu.edu/SmalltalkDocs/GlorpTutorial.pdf</a>)<br>
states that it should reattach any nested objects (proxies) too but it<br>
does not.<br>
<br>
Is this known problem or am I doing something wrong? I can try to fix<br>
this if this is an actual bug. Of course using refresh:<br>
one can avoid this problem but it causes unnecessary database reads to occur.<br>
<br>
<br>
--<br>
Panu<br>
_______________________________________________<br>
SqueakDBX mailing list<br>
<a href="mailto:SqueakDBX@lists.squeakfoundation.org" target="_blank">SqueakDBX@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx</a><br>
</div></div></blockquote></div><br>