0

I'm using Wildfly26 and in my code I have this simple query:

@NamedQuery(name = "fixed-price.initialSetupPeriod", query = "SELECT e FROM FixedPriceException e WHERE e.flgAct ='S' AND e.datFim >= :start AND e.datIni <= :end")})
final Query q = em.createNamedQuery("fixed-price.initialSetupPeriod");
        q.setParameter("start", interval.getStart(), TemporalType.DATE);
        q.setParameter("end", interval.getEnd(), TemporalType.DATE);
        @SuppressWarnings("unchecked")
        final List<FixedPriceException> priceLimits = q.getResultList();
        if (priceLimits == null) {
            return;
        }

Previously, when I use this ojdbc driver com.oracle.database.jdbc:ojdbc6:11.2.0.4 I could use TemporalType.DATE to unsure that the query only checks the date by day and ignores the time (hour and minutes). When I upgrade the ojdbc driver this same query starts looking also to time (hour and minutes), which changed the behavior of my code to something unexpected.

Any of this ojdbc drivers misbehaving:

  1. com.oracle.database.jdbc:ojdbc11:21.8.0.0 (first I try when upgrade)
  2. com.oracle.database.jdbc:ojdbc10:19.17.0.0
  3. com.oracle.database.jdbc:ojdbc8:21.8.0.0

I upgrade this ojdbc driver when I did Wildfly9 migration to Wildfly26.

Why does this happen?

Manuel Franqueira
  • 326
  • 1
  • 4
  • 13

0 Answers0