Login  Register

Re: #become: and #oneWayBecome:

Posted by Esteban A. Maringolo-2 on Jan 14, 2005; 1:03pm
URL: https://forum.world.st/become-and-oneWayBecome-tp3372645p3372694.html

Hi Chris:

Chris Uppal escribió:

>>Once anORPStub receives a message (which should go to it's subject)
>>it will lookup in the session object registry (a kind of cache)
>>using it class and key, if the session doesn't find it in it's cache
>>it will lookup in the storage (SQL by now), if doesn't exists, it
>>will answer nil, or the object (new or cached). The stub will become
>>(oneWay) the object answered.

> Reading your reply to Blair, it sounds as if you've decided to change that
> design a bit.
 > I just wanted to add that if you can control the referential
> integrity in the DB closely enough, then you could ensure that you
 > never create a stub for data that will (later) turn
 > out not to exist.

I do this, if the reference is nil. I'm only instancing the stub if
the value (the key which is foreign) isn't nil (aDBRow at:
'myReferencedColumn' is nil).

Now i've changed it to ask for the stub, instancing it if neccesary.
I'm having problems, many recursions too deep, GPFaults, something
is going wrong, perhaps I wasn't sober enough.

>>Yes... i tend to have a "virtual nothing" in almost everything, an
>>object that is to my domain as nil is to smalltalk. But as continue
>>learning, i'm not reinforcing that approach.

> Odd that.  I started out not using them much, but find that I'm using them more
> and more as time goes on...  Maybe we'll meet somewhere in the middle ;-)

Or perhaps I'll go reverse.

>>>>Is possible to make a trick to speed up the proccess of
>>>>#oneWayBecome: using a combination of #becomes:'s... or similar

>>>[SNIP]
>>[SNIP]
> I'm sorry.  I misread you as asking /whether/ such a trick existed;
 > I didn't realise you were saying you had already /found/ one.

No no, your intuition was right. I wrote that wrong. Where reads "Is
Possible" should say "It is possible". My english isn't the best :-D

 > What is it please ?

That is ;-)

 > (Unless the "entropy" argument has persuaded you that it won't work).

Too much reading of Stephen Hawking perhaps... :-D


Best regards

--
Esteban A. Maringolo
[hidden email]