Why are you using a separate table “employeeType” just to hold a list of strings? I’d make the “eType” field of “employee” a string, and then it’s simple.
Actually the issue is I think in your query syntax. Actually as Employee and EmployeeType are two different tables you need to have a join (AFAIK, I’m not a JPQL expert).
Here is a version that I think should do what you want:
SELECT e
FROM Employee e
JOIN e.eType type
WHERE type.persistenceId = :inputId
ORDER BY e.persistenceId ASC
I am using a separate table because it will be helpful while preparing a report based on employeeType. instead of user entering the text he will select it from the dropdown, other wise the user may enter text with spelling mistakes.
Ok - but you can populate a dropdown of fixed options in a form without having to hold the options in a table. If you want them to be configurable there are plenty of ways of doing that without adding complexity to the DB definition.
Custom queries using JPQL is also available in Community Edition. Note that I'm not sure that JOIN operation is supported in JPQL in Bonita it need to be tested.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.