Skip to content

Instantly share code, notes, and snippets.

@pjazdzewski1990
Created June 18, 2015 08:02
Show Gist options
  • Save pjazdzewski1990/d9a8e9e68d28bf011f88 to your computer and use it in GitHub Desktop.
Save pjazdzewski1990/d9a8e9e68d28bf011f88 to your computer and use it in GitHub Desktop.
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