Open tmulle opened 1 year ago
/cc @FroMage (panache), @loicmathieu (panache)
@tmulle have you checked out JPA streamer instead of Panache? It looks more like EBean.
JPA streamer
Ebean query beans are similar to JPA streamer - https://ebean.io/docs/query/query-beans ... for writing queries in a more type safe manor.
With Ebean query beans (type safe) you'd write that first query as:
List<CrumbModel> allModels =
new QCrumbModel()
.modelName.ne("ALL")
.orderBy().modelName.asc()
.findList();
... QCrumbModel
as a "query bean" that is generated via an annotation processor.
Description
One of the legacy projects I'm working on converting from a Play/Scala/EBean ORM application to run on Quarkus uses EBean ORM instead of JPA/Hibernate. It was written 10+ years ago.
I want to be 100% quarkus eco-system so I can work with the DEV mode.
And unfortunately, EBean doesn't work with quarkus DEV mode, and the developer is only one person.
During the conversion of the data layer I find EBean has a lot of nice syntax for building queries that Panache I think could benefit from if you want to make it a "simplified" Hibernate alternative.
I'm not affiliated with EBean in anyway, just was introduced through my current conversion.
I think it might be worth while for the developers of Panache to reach out to the creator of EBean (if you haven't already) and maybe work together to join forces on JPA persistence.
The author claims he does a lot of things "correctly" that Hibernate gets wrong, and he does other "optimizations", etc.
I can't validate those, I just really like the syntax of building queries. I find myself having to manually rewrite the old legacy code into raw JPA/HQL when I have to search on more than one field/criteria in Panache.
For example, here is how I have to rewrite queries, not terrible for this example, but gets pretty involved when the criteria because larger with more fields and things like
iLike
,ne
,gt
, etc.Here is another example of doing
FETCHES
in EBean:Just a thought...
https://ebean.io
Implementation ideas
No response