Which ORM?

418 views
Skip to first unread message

Justin L

unread,
Mar 23, 2015, 3:40:34 PM3/23/15
to play-fr...@googlegroups.com

Its been a while since I've created a new Play application.

What is the ORM of choice these days for Java Play apps?

The last time I used eBean. But it looks like it is inactive.

Slick?

anorm + SQL?

I see a link on 2.3 docs to Spring Data?


Rafael Trindade Chiappetta

unread,
Mar 23, 2015, 4:03:09 PM3/23/15
to play-fr...@googlegroups.com
Slick isn't ORM.

=====
Rafael Trindade Chiappetta


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin L

unread,
Mar 23, 2015, 4:17:08 PM3/23/15
to play-fr...@googlegroups.com

Neither is anorm. I apologize for any confusion. I am asking how the community chooses to access databases in Java apps written with Play Framework 2.3.x.

Naftoli Gugenheim

unread,
Mar 23, 2015, 8:14:20 PM3/23/15
to play-fr...@googlegroups.com

I think slick and anorm require scala.
From Java I would say to have a look at JOOQ.

Thiago Lima

unread,
Mar 24, 2015, 7:02:28 AM3/24/15
to play-fr...@googlegroups.com
Ebean is not inactive at all. Check their usergroup, here at google groups. https://groups.google.com/forum/#!forum/ebean

Jamie X

unread,
Mar 24, 2015, 9:32:18 AM3/24/15
to play-fr...@googlegroups.com
JOOQ looks really nice, But - like Slick - requires licensing in a commercial environment.

So if you don't have any budget then that might be a consideration.

Mirco Dotta

unread,
Mar 24, 2015, 10:10:00 AM3/24/15
to play-fr...@googlegroups.com
That’s incorrect. You can use Slick for free with all open source databases (see here for a list of supported databases). While, if you are using Oracle, IBM DB2 or Microsoft SQL Server, then usage is free during development, but you’ll need a license for production.

Cheers,
Mirco
----------------
Mirco Dotta - @mircodotta

Typesafe – Build reactive apps!

Mirco Dotta

unread,
Mar 24, 2015, 10:10:40 AM3/24/15
to play-fr...@googlegroups.com

----------------
Mirco Dotta - @mircodotta

Typesafe – Build reactive apps!

Rafael Trindade Chiappetta

unread,
Mar 24, 2015, 11:10:15 AM3/24/15
to play-fr...@googlegroups.com
grabbing a hook at this question...

talking about scala. would you guys go with Slick or eBean?

=====
Rafael Trindade Chiappetta


Pedro Antonio Hidalgo Guzmán

unread,
Mar 24, 2015, 11:42:18 AM3/24/15
to play-fr...@googlegroups.com
I prefer Ebean. I use it with java and scala as well.

Rafael Trindade Chiappetta

unread,
Mar 24, 2015, 1:19:00 PM3/24/15
to play-fr...@googlegroups.com
I had some problems using eBean together with specs2.. it was complaining about the entity not being enhanced. I didn't find out any way to solve this, so I switched to slick to give it a try. I think it is nice, but way different. It is not an ORM, so I need to get used to it.

=====
Rafael Trindade Chiappetta


Aurélien

unread,
Mar 24, 2015, 3:48:52 PM3/24/15
to play-fr...@googlegroups.com
I also advise jOOQ on a Java environment (though it is not an ORM).

However, jOOQ only requires licensing if you are working with commercial databases (ie Oracle, SQL Server, ...). That means that even in a commercial environment, jOOQ is completely free if you are using MySQL or PostgreSQL. To be sure, you can check http://www.jooq.org/download/

Cheers,
Aurélien

Justin L

unread,
Mar 25, 2015, 6:10:14 PM3/25/15
to play-fr...@googlegroups.com

Yes, I still use it myself.

But according to the avaje website there hasnt been a relase in 12 months where in 2013 (when I started using it) there were 4 releases that year.

I might just go with it anyway. I'm trying to do the Play + Spring Data tutorial but the template app doesnt even build. That's a bad sign in my opinion.

Ian Rae

unread,
Mar 26, 2015, 8:55:59 AM3/26/15
to play-fr...@googlegroups.com
A release of EBean occurred on Feb 9, according to the ebean newsgroup:

https://groups.google.com/forum/#!topic/ebean/Fl9IU7QW83k

However, Play 2.3 uses EBean 3.x, and the new ebean releases are 4.x, which require Play 2.4.

Alex Loskutov

unread,
Mar 27, 2015, 10:57:15 AM3/27/15
to play-fr...@googlegroups.com
I prefer Squeryl

It is very helpful lib which contains very simple SQL DSL 

http://squeryl.org/getting-started.html

понедельник, 23 марта 2015 г., 22:40:34 UTC+3 пользователь Justin L написал:

Herman Banken

unread,
Mar 29, 2015, 6:18:49 PM3/29/15
to play-fr...@googlegroups.com
I'm in favor of Squeryl as well. The fact that you have type-safety and still have the possibility to write extremely complex queries is just fantastic. 

It gives so much more confidence when changing your database model. When you apply an evolution, you at the same time need to make sure that your application models reflect the new Schema, which you'll do anyway if you need to access new fields. Then, during compilation, the Squeryl DSL will complain about renamed or removed fields as they no longer exist on your models.

Also you can just write your model once (case class Foo(field: String, whatever: Long)) and then Squeryl parses the rows, even complex ones which are the results of joins and aggregation queries/computes.

Squeryl can also generate SQL schema's. So if you want to go to full type-safety Squeryl could also be extended to act as an alternative to the Evolution plugin. Or it can complement it: checking if the schema in the database is different from the one it would generate itself. Then you could show a warning on startup. These things do not yet exist on top of Squeryl, but it would be quite easy to create.

Onezino Gabriel Moreira

unread,
Mar 30, 2015, 11:48:11 AM3/30/15
to play-fr...@googlegroups.com
Yeaph.
The ebean release that play 2.3 use is very out of date. I need to  try another solution because some bugs I has found.
My new fresh project now is using spring-data and I'm very confident about this.

Eax Melanhovich

unread,
Apr 1, 2015, 11:50:43 AM4/1/15
to Justin L, play-fr...@googlegroups.com
I personally prefer Slick.
--
Best regards,
Eax Melanhovich
http://eax.me/

Manuel Bernhardt

unread,
Apr 2, 2015, 5:10:35 AM4/2/15
to play-fr...@googlegroups.com, Justin L
Perhaps a bit outdated, but this gives an overview of existing options in Scala-Land: http://manuel.bernhardt.io/2014/02/04/a-quick-tour-of-relational-database-access-with-scala/

I investigated this for the purpose of integration with Play, so it should be relevant to your question

HTH

Manuel

Reply all
Reply to author
Forward
0 new messages