Hibernate vs ebean - scalable, efficient ORM

We are going to write a service for which we are trying to evaluate a technology stack. Therefore, as part of ORM, we are thinking of using sleep mode, but I learned abt ebean from one of my colleagues. But we have no idea about ebean.

So my question is: is there any flaw related to hibernation, any narrow task in the area of ​​performance or performance? And what is the advantage of ebean brings to the table?

+6
source share
3 answers

What does Anes bring to the table?

In short with Ebean, it brings the full ORM function, which is much easier to use and, most importantly, optimizes (well, it's easy, but can also be done automatically through profiling).

  • A query language designed to optimize the construction of a graph of objects using good support for Partial objects and the built-in avoidance of N + 1

  • A lighthearted "ORM ... so as not to have attach / detach semantics (Thus, this makes it easier to use / fast for mastering).

Ebean now has SQL2011 history support and integration with ElasticSearch. You can argue that Hibernate has similar features.

References:

+5
source

There are many problems with hibernation and basically any JPA implementation in a large and very scalable application. You should consider using a different solution. The problems are well described in the article Problems with a large application model and how the model should look in the article Model for large applications .

+1
source

As mentioned earlier, Ebean is a session ORM, so you don't need to think about sessions. Hibernate has a first level cache that cannot be disabled. This means that if you request an element through ORM and then delete it directly using SQL, it remains in the cache. You can explicitly clear the cache to get the latest results from the database, but, unfortunately, this behavior can lead to errors, for example, "deleted object passed for storage."

+1
source

Source: https://habr.com/ru/post/971076/


All Articles