Skip to content

Instantly share code, notes, and snippets.

@pjazdzewski1990
Created June 18, 2015 08:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
import io.scalac.inventory.db.{Office, CanonicalForm}
import net.fwbrasil.activate.entity.Entity
object Domain {
....
sealed case class Item(val name: String, val code: Long, var office: Office)
class ItemEntity(val name: String, val code: Long, var inOffice: OfficeEntity) extends Entity {
...
def codeMustBeUnique = unique(_.code)
}
....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment