-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Panache: Incorporate features from EBean ORM for Panache or join development effort? #31792
Comments
/cc @FroMage (panache), @loicmathieu (panache) |
@tmulle have you checked out JPA streamer instead of Panache? It looks more like EBean. |
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(); ... |
@rbygrave do you have any clue about how to make ebean working in quarkus dev mode (with hot-reload). From what I see, as soon as you modify an entity class, the reload phase fails with the message:
|
Have you tried the JPA Criteria API? We could add support in Panache to make using this easier. |
This is an error that the ebean querybean-generator annotation processor reports. It looks like the querybean-generator is looking to get the FileWriter such that it can later on write the generated for for EntityClassRegister. What this generated EntityClassRegister does, is it knows all of the entity bean classes (plus other bits like AttributeConverters etc) and allows Ebean to start up faster by registering those as known rather than scanning the classpath for them etc. Thats interesting because if we are just modifying an existing entity bean in this hot-reload mode, then that would be fine for EntityClassRegister per se.
Pretty confident that the EntityClassRegister already exists / it was already generated in some prior compilation. So now in some hot-reload / perform some incremental compilation mode, the querybean-generator is again trying to obtain that FileWriter and that fails because it already exists.
There are definitely a few things that could be tried.
|
wrt ebean querybean-generator I have released an RC version if you want to try it - Note that there are some other issues I see in that the hot reload compilation does not apply the ebean enhancement so we can't perform changes to query bean queries in this mode per se. |
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
The text was updated successfully, but these errors were encountered: