Created
September 15, 2012 08:05
-
-
Save robinp/3726916 to your computer and use it in GitHub Desktop.
Squeryl persisting changes hashCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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