I&#39;ll read about ForwardingProxies because I didn&#39;t use it yet.<div><br></div><div>To clarify the context, I&#39;m bulk load transactions from a csv file, so I proccess the file and create each transactions in the user session and I need referencing system entities (operationsTypes, etc) from their codes or names (atCode:) but for do that or I need pass the user session by argument or do a copy to the entity from the shared session. Can you understand my poor english explanation now?</div>
<div><br></div><div>Thanks for your help,</div><div>Facu<br><br><div class="gmail_quote">On Thu, Dec 9, 2010 at 4:35 PM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com">asqueaker@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;">I&#39;m not sure I fully understand the context, but a third option might<br>
be to use ForwardingProxies.  Especially if the shared objects can be<br>
updated by only one session (like a batch updater, for example).  Then<br>
every other (user client) session will share the same instances in<br>
memory.<br>
<br>
HTH,<br>
  Chris<br>
<div><div></div><div class="h5"><br>
On Wed, Dec 8, 2010 at 1:13 PM, Facundo Vozzi &lt;<a href="mailto:facundov79@gmail.com">facundov79@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt; I&#39;m refactoring my code and I found that I have two ways to do the same in<br>
&gt; distint parts of my system.<br>
&gt; 1) Entity class &gt;&gt; atCode: aCode<br>
&gt; &quot;Answer the receiver instance with code equal to aCode or evaluate aBlock if<br>
&gt; it doesn&#39;t exists.&quot;<br>
&gt;        ^(self all detect: [:one | one code = aCode]) copy<br>
&gt; or<br>
&gt; 2) Entity class&gt;&gt; atCode: aCode inSession: anUserSession<br>
&gt; &quot;Answer the receiver instance with code equal to aCode or evaluate aBlock if<br>
&gt; it doesn&#39;t exists.&quot;<br>
&gt;<br>
&gt;        ^(self allInSession: anUserSession) detect: [:one | one code = aCode]<br>
&gt; The difference is that 1 is using the shared session so I need copy the<br>
&gt; object to be used (referenced by other object) on anUserSession. The uggly<br>
&gt; of 2 is that I have to pass anUserSession as argument.<br>
&gt; Either way works well, is really the same?<br>
&gt; Thanks in advance,<br>
&gt; Facu<br>
&gt; (*) I eliminate aBlock for absent elements for this example<br>
</div></div>&gt; _______________________________________________<br>
&gt; Magma mailing list<br>
&gt; <a href="mailto:Magma@lists.squeakfoundation.org">Magma@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/magma" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/magma</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br></div>