This is an example app to show you how to use Skinny ORM in Play apps.
Play Framework with Skinny ORM
http://www.lightbend.com/activator/template/skinny-orm-in-play
https://www.playframework.com/
http://skinny-framework.org/documentation/orm.html
"org.skinny-framework" %% "skinny-orm" % "2.1.+"
You should add a dependency in build.sbt and add a pluing to conf/play.plugins.
See http://scalikejdbc.org/documentation/playframework-support.html
If you need db migration, use Play's evolution or @tototoshi's flyway plugin.
# brew install npm
npm install
# npm install -g bower
bower install
./gulp build
# brew install sbt
sbt run
# access localhost:9000 from your browser
task
sub project is ready. Try sbt task/run generate:model {Entity} {attributes}
.
sbt "task/run model Follow followerUserId:Long followingUserId:Long follower:Option[User] following:Option[User]"
sbt "task/run reverse-model Follow"
sbt "task/run reverse-model-all"
- Option[{Entity}]: belongsTo association
- Seq[{Entity}]: hasMany association
- Seq[{Entity1}{Entity2}]: hasManyThrough association
heroku login
heroku git:remote -a {heroku app name}
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-scala
git push heroku master
Here are some example DAOs.
https://github.com/skinny-framework/skinny-orm-in-play/tree/master/app/models
http://skinny-framework.org/documentation/orm.html
or ask us anything here:
https://groups.google.com/forum/#!forum/skinny-framework
(The MIT License)
Copyright (c) skinny-framework.org