Which is best data access options available for Play framework with Scala and PostgreSQL?
If you definitely want an ORM then JPA is probably the road to go. This will force you to have mutable domain model classes etc. but maybe this is a trade off you are willing to accept. (Personally, I wouldn't)
If you are open to alternative ways to talk to a database there are a few interesting options:
- anorm - Close to SQL but way nicer than using JDBC directly - https://playframework.com/documentation/2.3.7/ScalaAnorm
- slick - "Functional Relational Mapping", typesafe queries - http://slick.typesafe.com
- activate - "Software Transactional Memory" with pluggable persistence backends - http://activate-framework.org
Here is a pretty good blog post that compares different libraries: http://manuel.bernhardt.io/2014/02/04/a-quick-tour-of-relational-database-access-with-scala/
Take a look at Skinny ORM.
http://skinny-framework.org/documentation/orm.html
http://blog.seratch.net/post/110711051753/skinny-orm-for-play-framework
Skinny ORM is not only highly inspired by Rails ActiveRecord but flexible enough because it is built upon ScalikeJDBC library which is a thin but powerful JDBC wrapper.
ebean is provided with playframework it look alike JPA but is not JPA, you could make simple query and efficent (streaming, partial update ...)