[Glass] how to update models properly

James Foster via Glass glass at lists.gemtalksystems.com
Thu Oct 30 12:17:45 PDT 2014


Dale has given a good overview of the rules for using an OOP. I would add a disclaimer. Officially, we consider the OOP to be internal. In our own tools (GemBuilder for Smalltalk, etc.) we rely on the OOP remaining the same during the life of an individual Gem, and based on the GCI library architecture, design, and documentation this is guaranteed. We do, however, reserve the right to change an object’s OOP at other times and have done so at least once—at the migration from 32-bit to 64-bit. 

Thus, using an OOP to interact with a user client during the life of a login session is safe as long as you understand the design Dale described (especially the export set). Storing an OOP in a foreign system would be moving beyond our internal use and would be slightly more risky. It is a small risk, but there are no guarantees beyond the life of the Gem that retrieved the object and obtained its OOP.

James

> On Oct 30, 2014, at 11:45 AM, BrunoBB via Glass <glass at lists.gemtalksystems.com> wrote:
> 
> James,
> 
>> The extreme case would be to use the OOP/OID from GemStone as the unique
>> ID
> 
> I have a similar case in my application. Some GemStone object are updated
> from a Relational Database (MySQL).
> 
> * Once an Object has an OOP it will remain the same until the Object is
> garbage collected ?
> * Or the OOP of an object can change during it's life time ?
> 
> In my app each Relational Row is mapped to a Dictionary, and the Object it
> self is never changed but it's instance variables are constantly updated
> with relational data.
> 
> If i use the OOP as way to map object with external system we MUST be sure
> that the OPP is allways the same...
> 
> Regards,
> Bruno
> 
> 
> 
> 
> --
> View this message in context: http://forum.world.st/Glass-how-to-update-models-properly-tp4787473p4787663.html
> Sent from the GLASS mailing list archive at Nabble.com.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list