Keith Hodges a écrit :
Hello,
I was asking similar questions a while back. These links may help:
http://article.gmane.org/gmane.comp.lang.smalltalk.squeak.magma/276/match=qu...
http://article.gmane.org/gmane.comp.lang.smalltalk.squeak.magma/280/match=qu...
Thanks for the indication.
In your companies example I think it depends upon how UserA and UserB find their companies.
Yes, User's company attribute refer to object defined in the local application. In fact Company instance does not need to be persisted as it is unchangeable value.
What I am afraid of is that when persisting one object I may also persist much more than I want.
Eventually User's instance should reference company through their hash value but this will add complexity. I am not sure how I should handle that situation.
If you arrange for your companies to be persisted in some form of keyes/indexed collection and found from there, then the users are likely to find the same company instance.
hope this helps
yes, thanks,
Hilaire