exists() in BaseORMService is not universally functional because the property name of id is hard coded in to the HQL.
In addition, this method will not work on entities which have an entity name which is a reserved word in the DBMS platform ( e.g. Case ).
The key property should be dynamically retrieved for the HQL in ormExecuteQuery.
In addition, investigate if there is a ways to provide escaping for entities and property names which are reserved words : e.g [Case] for SQL Server, "Case" for MySQL and Postgres, etc
exists()
inBaseORMService
is not universally functional because the property name ofid
is hard coded in to the HQL.In addition, this method will not work on entities which have an entity name which is a reserved word in the DBMS platform ( e.g.
Case
).The key property should be dynamically retrieved for the HQL in
ormExecuteQuery
.In addition, investigate if there is a ways to provide escaping for entities and property names which are reserved words : e.g
[Case]
for SQL Server,"Case"
for MySQL and Postgres, etc