Thierry Lam
Thierry Lam

Reputation: 46294

How do I import the User object in Scala's web framework Lift?

I'm following the Lift tutorial and it is referencing to a User object. It doesn't say where it's coming from. I also could not find it in the API. Does anyone know what I have to import to get it?

Here's the sample code with a FK to User in the model:

object owner extends MappedLongForeignKey(this, User) 

Upvotes: 2

Views: 383

Answers (1)

user175986
user175986

Reputation:

The User object will be part of your source. Assuming that you've done the com.liftworkshop project, it will be in todo/src/main/scala/com/liftworkshop/model/User.scala and can be imported from "com.liftworkshop.model.User".

The default User class and object are built from the MetaProtoUser and MetaMegaProtoUser traits in net.liftweb.mapper.

Upvotes: 4

Related Questions