-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working samples of PLAY 2.6 + SCALIKEJDBC 3.2
#30
Labels
Comments
from #31 最後の def list = Action { implicit request =>
val u = Users.syntax("u")
DB.readOnly { implicit session =>
// ユーザのリストを取得
val users = withSQL {
select.from(Users as u).orderBy(u.id.asc)
}.map(Users(u.resultName)).list.apply()
// ユーザの一覧をJSONで返す
Ok(Json.obj("users" -> users))
}
} |
from #32 元ソース """{"users":[{"id":1,"name":"Taro Yamada","companyId":1},{"id":2,"name":"Jiro Sato"}]}""" 下記のように """{"users":[{"id":1,"name":"Taro Yamada","companyId":1},{"id":2,"name":"Jiro Sato","companyId":null}]}""" |
mado-m
changed the title
PLAY 2.6 + SCALIKEJDBC 3.2 の"ジョインの必要な処理"->"コントローラの修正"のソースがエラーとなる
Not working ~`PLAY 2.6 + SCALIKEJDBC 3.2
Jun 27, 2019
mado-m
changed the title
Not working ~`PLAY 2.6 + SCALIKEJDBC 3.2
Not working Jun 27, 2019
PLAY 2.6 + SCALIKEJDBC 3.2
mado-m
changed the title
Not working
Not working samples of Jun 27, 2019
PLAY 2.6 + SCALIKEJDBC 3.2
PLAY 2.6 + SCALIKEJDBC 3.2
再度手順通りにやってみたら問題なく動いたので一旦閉じます。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
元ソース
下記のように
val u = Users.syntax("u")
を追記することでコンパイルエラーは回避できました。The text was updated successfully, but these errors were encountered: