Oracle specific error

Hi,

we get an error in Oracle in our application that does not occur under MySql.

Here is our log file:oracleError.log (12.5 KB)

grafik

  • In the example above the EditScreen of our Entity (PersonGroup) is opened.
  • The logged in user is a member of an AccessGroup with constraints on the entity (see screenshot).
  • Without assignment to this group, the error does not occur.
  • The problem seems to be the “distinct” in the query generated by CUBA. For example, the same query without distinct functions in SQLDeveloper

Can someone help us?

Lars

Hi,

The problem relates to SQL queries with the DISTINCT statement and LOB columns on ORACLE DB.
CUBA adds DISTINCT to a query if constraint contains a join statement. It’s required for single result select.
As a workaround, you can try to rewrite JPQL constraint without JOIN statement using IN or EXISTS e.g.:

{E}.id in (select kc.personGroup from KeyCabinets kc where kc.id in :session$listManagedKeyCabinets)