Super quick start with Lift's ProtoUser

Lift provides a trait called ProtoUser, which helps you in quickly adding base functionality to your application for user-specific data. The Lift book mentions this class very briefly, but it makes the assumption that the reader will be to intuit how to complete the example code to have a base starting point. Here’s what you must have (assuming this is in the model directory):

package app.model

class User extends ProtoUser[User] with LongKeyedMapper[User] {
def getSingleton = User
}

object User extends User with LongKeyedMetaMapper[User]


You need to mix in the LongKeyedMapper trait, and you need the User singleton.