How to import User object into Scala web framework Lift?
I am following the Raise tutorial and is linking to an object User
. He doesn't say where he is from. I couldn't find it in the API either. Does anyone know what I need to import in order to get it?
Here's a sample code from FK to User
in the model:
object owner extends MappedLongForeignKey(this, User)
+2
source to share
1 answer
The custom object will be part of your source. Assuming you run 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 custom class and default object are built from the MetaProtoUser and MetaMegaProtoUser properties in the net.liftweb.mapper file.
+4
user175986
source
to share