In below code I am using concat_ws in criteria builder but it's not working instead if i use multiple concat it works. but i want use concat_ws. Is there other way to achieve this.
CriteriaBuilder cb=entityManager.getCriteriaBuilder()
CriteriaQuery<String> cq=cb.createQuery(String.class)
Root<A.class>a=cq.from(A.class)
join<A,B>join=a.join("join_key",joinType.LEFT)
cq.select(
cb.function("CONCAT_WS",String.class,cb.literal("/"),a.get("path1"), a.get("path2"),a.get("path3"))
);