My application is deployed to Wildfly 10.1. server including Hibernate 5.0.10.
Using the Criteria API this statement is sent to the database:
Code:
select
distinct ...
from
mbi_festa mbifesta0_
inner join
mbi_feber mbifeber1_
on mbifesta0_.bereich_nr=mbifeber1_.bereich_nr
inner join
mbi_fekvw mbifekvw2_
on mbifesta0_.festa_serial=mbifekvw2_.festa_serial
where
(
mbifeber1_.bereich_nr in (
801 , 912
)
)
and (
mbifesta0_.status between 1 and 8
)
and mbifekvw2_.verw_tabelle=1
and mbifekvw2_.aufloes_knz='1'
and (
exists (
select
(mbiaflap3_.lade_nr,
mbiaflap3_.ladepos_nr)
from
mbi_aflap mbiaflap3_
where
mbiaflap3_.afsta_serial=mbifekvw2_.stamm_serial
and mbiaflap3_.pos_nr=mbifekvw2_.af_pos_nr
and mbiaflap3_.lade_nr>=19260
and mbiaflap3_.lade_nr<=19260
)
)
Oracle 11 database gives us an errror: ORA-00907: missing right parenthesis. Oracle does not like the left parenthesis "and" and "exists".
Is there any option / property that can be used to reduce the number of parenthesis used?
Some and conditions are inside parenthesis (e.g. "mbifesta0_.status between 1 and 8") others not (e.g. "mbifekvw2_.verw_tabelle=1").