# After upgrade to 6.3.1 I get warning HHH90000025

**URL:** <https://discourse.hibernate.org/t/after-upgrade-to-6-3-1-i-get-warning-hhh90000025/8380>\
**Category:** Hibernate ORM\
**Created:** [October 11, 2023, 4:28pm UTC](https://discourse.hibernate.org/t/after-upgrade-to-6-3-1-i-get-warning-hhh90000025/8380 "2023-10-11T16:28:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrtux](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mrtux](https://discourse.hibernate.org/u/mrtux)\
**Post date:** [October 11, 2023, 4:28pm UTC](https://discourse.hibernate.org/t/after-upgrade-to-6-3-1-i-get-warning-hhh90000025/8380/1 "2023-10-11T16:28:35Z")

</div>

Hi,

after upgrading from 6.2.8 to 6.3.1 I get the warning  
`HHH90000025: MariaDBDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)`. I use MariaDB 10.6. If I understood correctly, this warning should only occur if I use a too specific deprecated dialect such as MariaDB106Dialect.

In hibernate.cfg.xml I have the line `<property name="dialect">org.hibernate.dialect.MariaDBDialect</property>`.

Is this correct? If yes, can I just remove that line and how does Hibernate detect the correct dialect?

PS: I also just experienced a warning from `org.hibernate.sql.results.jdbc.internal.DeferredResultSetAccess` with MariaDB 10.6: `HHH000444: Encountered request for locking however dialect reports that database prefers locking be done in a separate select (follow-on locking); results will be locked after initial query executes`. The method `useFollowOnLocking()` is implemented in org.hibernate.dialect.Dialect (always returns false) and is neither overwritten in MySQLDialect nor MariaDBDialect. The query code looks like this:

```auto
CriteriaQuery<Integer> criteria = builder.createQuery(Integer.class);
Root<TestCount> root = criteria.from(TestCount.class);
criteria.select(builder.sum(root.get(TestCount_.timesExecuted)));
criteria.where(builder.and(root.get(TestCount_.test).in(submission.getTask().getTests()), builder.equal(root.get(TestCount_.user), participation.getUser())));
Query<Integer> query = session.createQuery(criteria);
query.setLockMode(LockModeType.PESSIMISTIC_WRITE);
Integer testCount = query.uniqueResult();

```

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [October 12, 2023, 2:14pm UTC](https://discourse.hibernate.org/t/after-upgrade-to-6-3-1-i-get-warning-hhh90000025/8380/2 "2023-10-12T14:14:42Z")

</div>

> this correct? If yes, can I just remove that line and how does Hibernate detect the correct dialect?

Yes, you can remove `<property name="dialect">org.hibernate.dialect.MariaDBDialect</property>`. Hibernate will determine the dialect based on the JDBC metadata.

> I also just experienced a warning from

You are using locking `LockModeType.PESSIMISTIC_WRITE` even though you are using an aggregate function. The warning is a false positive, because you’re actually not selecting an entity so there is no follow on locking done. You can create a Jira ticket for this.

---

<div class="post-metadata">

**Author:** ![mrtux](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mrtux](https://discourse.hibernate.org/u/mrtux)\
**Post date:** [October 17, 2023, 3:22pm UTC](https://discourse.hibernate.org/t/after-upgrade-to-6-3-1-i-get-warning-hhh90000025/8380/3 "2023-10-17T15:22:23Z")

</div>

Cross-ref: [Hibernate ORM - Issues - Hibernate JIRA](https://hibernate.atlassian.net/jira/software/c/projects/HHH/issues/HHH-17321)
