case classIdentity() extends Annotation with StaticAnnotation with Product with Serializable
Specifies that the value is the identifier for the entity.
Use when the Scala to Database identifier conversion routine isn't correct for your schema.
Example:
// the table 'book' in the database will have a primary key 'book_reference' in the databasecaseclass Book (
@(Identity @field) bookReference: Int
name: String
)
Only one identity can be specified, compound keys are not supported.
The key must be an Int, although this restriction maybe lifted one day.
Really, we expect the schema to have integer surrogate keys on all tables, and
although not text book database design, your life will be easier even if you don't
use dbmapper...
Linear Supertypes
Serializable, Serializable, Product, Equals, StaticAnnotation, Annotation, AnyRef, Any
Specifies that the value is the identifier for the entity.
Use when the Scala to Database identifier conversion routine isn't correct for your schema.
Example:
Only one identity can be specified, compound keys are not supported.
The key must be an Int, although this restriction maybe lifted one day.
Really, we expect the schema to have integer surrogate keys on all tables, and although not text book database design, your life will be easier even if you don't use dbmapper...