[squeak-dev] ReferenceStream Problem
Zulq Alam
me at zulq.net
Wed May 6 19:49:27 UTC 2009
When deserializing Dictionary objects, it looks like they are being
rehashed. Where and why is this happening?
dict1 := Dictionary new.
1 to: 1000 do: [:e | dict1 at: e put: e].
rep1 := ReferenceStream streamedRepresentationOf: dict1.
dict2 := ReferenceStream unStream: rep1.
rep2 := ReferenceStream streamedRepresentationOf: dict2.
dict1 = dict2. " true "
rep1 = rep2. " false "
dict1 array size. " 2560 "
dict2 array size. " 1334 "
dict1 rehash.
dict1 array size. " 1334 "
I'm using ReferenceStreams to store object graphs in a relational
database as a BLOB using Glorp. Glorp determines whether to do an
updated by comparing the serialized form of objects with their last
state. This causes spurious UPDATEs.
Any ideas?
Thanks.
Zulq.
More information about the Squeak-dev
mailing list
|