Skip to content

Instantly share code, notes, and snippets.

@robinp
Created September 15, 2012 08:05
Show Gist options
  • Save robinp/3726916 to your computer and use it in GitHub Desktop.
Save robinp/3726916 to your computer and use it in GitHub Desktop.
Squeryl persisting changes hashCode
test("UuidAsForeignKey") {
import TestSchema._
val set = scala.collection.mutable.HashSet[UuidAsId]()
val primaryObject = new UuidAsId
println(primaryObject.hashCode)
set += primaryObject
primaryObject.save
println(primaryObject.hashCode) // now it is the hashCode of the id
assert(set contains primaryObject) // fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment