Created
August 26, 2012 17:52
-
-
Save lamielle/3482069 to your computer and use it in GitHub Desktop.
Using StringField as a workaround for Squeryl's current lack of UUIDField support
This file contains 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
class UUIDTest private() extends Record[UUIDTest] with KeyedRecord[String] { | |
override def meta = UUIDTest | |
val idField = new StringField(this, 36) { | |
override val defaultValue = UUID.randomUUID.toString | |
} | |
} | |
object UUIDTest extends UUIDTest with MetaRecord[UUIDTest] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment