JPQL we can't CONCAT(String, Integer) EclipseLink?
In a JPQL query I tried to concatenate a string with a integer, using CONCAT JPQL function, in a select clause, for example:
SELECT CONCAT(c.idClient, ' ', c.name) FROM Clients c;
But the result is not a readable String.
Can we only use String in CONCAT 开发者_开发技巧function?
CONCAT is meant for Strings, the result of calling it with a number would most likely depend on your database.
You could try converting the id to a char first, you could use the FUNC function in EclipseLink to call a native function in your database that converts from numeric to char.
精彩评论