Hilaire, I think you are right and I wonder why we didn't change it, yet. I can remember talking with Esteban about it. The culprit is that in VOCache the reversedObjects instance variable is a WeakKeyDictionary and not a WeakIdentityKeyDictionary. That is the reason why #isNew on an object returns true if equality is not the same. And this leads to object duplication. The whole purpose of the VOCache is to keep "identity" for the objects. So using an equality based collection is plain wrong.
Norbert > Am 06.03.2017 um 18:03 schrieb Hilaire <hila...@drgeo.eu>: > > The more I think the more it seems wrong to me. Whenever you ask an > instance to save itself, if already in repo it should not duplicate > itself whenever hash/= is overrided in this object. It does not sound as > an expected behaviour. > > Hilaire > > Le 05/03/2017 à 14:51, Hilaire a écrit : >> Understood. >> My use/understanding of hash and =, true in DrGeo, was more like unique >> identifier regarding its ontological characteristics (what distinguish >> it from other). So an exact same Point in DrGeo will have different hash >> value depending on its position on the plane, or it being free on a >> line, etc. May be I got it biased here. >> >> Anyway problem solved, comparing protocol was just rampant code. > > -- > Dr. Geo > http://drgeo.eu > >