currently we are upgrading from Cuba 6.10 to Cuba 7 after upgarde we have scripts that was executing before currently after upgrade we are getting the below exception while firing them without any change
com.haulmont.cuba.core.global.RemoteException:
---
com.haulmont.cuba.core.sys.jpql.JpqlSyntaxException: Errors found for input jpql:[select pegp.externalEmployeesHost.id, pegp.externalEmployeesHost.name from vp$PayrollEmployeesGroupProfile pegp where pegp.profileTypeLkp.value = 'MOL ID' and pegp.payroll.id = :P_PAYROLL_ID union all select 'Default Host' from vp$Payroll prl where prl.id = :P_PAYROLL_ID]
CommonErrorNode [<mismatched token: [@51,197:201='union',<61>,1:197], resync=select pegp.externalEmployeesHost.id, pegp.externalEmployeesHost.name from vp$PayrollEmployeesGroupProfile pegp where pegp.profileTypeLkp.value = 'MOL ID' and pegp.payroll.id = :P_PAYROLL_ID union all select 'Default Host' from vp$Payroll prl where prl.id = :P_PAYROLL_ID>]
this exception is thrown while calling with data manager
list = dataManager.loadValues(reportParameter.getQuery()).properties("id", "value").list();
can you help with that why such behavior is happening
com.haulmont.cuba.core.global.RemoteException:
---
com.haulmont.cuba.core.sys.jpql.JpqlSyntaxException: Errors found for input jpql:[select pegp.externalEmployeesHost.id, pegp.externalEmployeesHost.name from vp$PayrollEmployeesGroupProfile pegp where pegp.profileTypeLkp.value = 'MOL ID' and pegp.payroll.id = :P_PAYROLL_ID union all select cast('00000000-0000-0000-0000-000000000000' as uuid), 'Default Host'
from vp$Payroll prl
where prl.id = :P_PAYROLL_ID]
CommonErrorNode [<mismatched token: [@51,197:201='union',<61>,1:197], resync=select pegp.externalEmployeesHost.id, pegp.externalEmployeesHost.name from vp$PayrollEmployeesGroupProfile pegp where pegp.profileTypeLkp.value = 'MOL ID' and pegp.payroll.id = :P_PAYROLL_ID union all select cast('00000000-0000-0000-0000-000000000000' as uuid), 'Default Host'
from vp$Payroll prl
where prl.id = :P_PAYROLL_ID>]
This is the correct Query that is fired while getting the exception
I’ve created an issue to investigate further the possibility to support ‘UNION’ for JPQL. The problem is that JPA specification doesn’t support ‘UNION’ statement in JPQL and CUBA only works with JPQL defined in the JPA specification. But since it is supported by Eclipselink we should investigate this possibility.