-
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
Warning during build: [org.hib.orm.deprecation] HHH90000025: PostgreSQLDialect does not need to be specified explicitly using 'hibernate.dialect' #37575
Comments
Hello @yrodiere I tried to look into this issue but without any luck. Can you provide some more details how to reproduce that? I am also wondering about your thoughts on this one, right now it seems that maybe we should remove this dialect setting explicitly (to satisfy hibernate) and see if this works. But I don't know if this is good thing to do - first I would like to see this myself, investigate and hopefully come with some solution proposition :) |
Hey @MaciejDromin
then you'll see the log entries during the native build:
To make it easier to debug, you can just run a test from that module and see when https://github.com/hibernate/hibernate-orm/blob/f4f62c81fa5c877a907f8fa587798f805ee374c6/hibernate-core/src/main/java/org/hibernate/engine/jdbc/dialect/internal/DialectFactoryImpl.java#L153 is reached. Line 1175 in 9eae64c
In general, ORM should be able to figure out the dialect itself from other info unless a user needs a custom dialect (see [1]). So maybe you could start by not setting the dialect and see where it takes you? [1] https://docs.jboss.org/hibernate/orm/6.4/introduction/html_single/Hibernate_Introduction.html (2.6. Basic configuration settings) |
Hey @marko-bekhta Thanks for the clues and some more insight into this issue!
I will try that and see what will happen. I hope to take a look into this issue in the following days |
Careful about that. This was supposedly true when I wrote that code, too, but I ended up having to set the dialect explicitly anyway. I don't remember why, unfortunately :/ I think it was something like Hibernate ORM not auto-detecting dialects when we set |
(That said, this is definitely the first step into investigating the problem. I'm just saying the solution may be more complex, or at least involve more tests). |
I checked that and you are right, dialect is not auto-detected when |
We can't pass a JDBC URL at that point. This code gets executed at build time, and the JDBC URL is a runtime property. It's perfectly valid for it to not be set at build time. Now, this is beginning to look like an incorrect behavior in Hibernate ORM;
If we're in case 2, the (temporary) solution to this issue might be to simply hide the warning, like we already do for other logs in |
Describe the bug
I got this during a native build, but I guess this might also happen for JVM builds.
Quarkus does set the dialect explicitly, but it seems Hibernate ORM doesn't like that anymore for some reason.
We should investigate.
Note I remember that back when we migrated to Hibernate ORM 6.0, we had tried to set "jakarta.persistence.database-product-name" for this purpose (and I guess that's what Hibernate ORM would like us to do), but I had to roll that back and set the dialect explicitly instead. I don't remember why exactly.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: