lborupj wrote:
Hi,
I need to concat two or more strings, but found no help in the Dialect classes of Hibernate. I expected to find either a hibernate function concat() or perhaps a method on Dialect to which I could give a list of strings.
My problem is that the app is expected to run on both PostgresQL and MySQL which uses || and CONCAT respectively.
Could this be a new feature for hibernate, cross-db string concatenation?
Create function on PGSQL:
create function CONCAT(TEXT,TEXT) RETURNS TEXT AS'
BEGIN
RETURN $1 || $2;
END;
' language 'plpgsql';
Or concatinate strings in java code.