So I have this formula query that joins two table to one table. The query works fine when I use it it pgadmin query tool but once I add it on Formula annotation for JPA/JAVA it throws an error of “ERROR: more than one row returned by a subquery used as an expression”.
Here is the sample formula query
(SELECT COALESCE(ws.name, h.name) FROM wbrr LEFT JOIN hub h ON h.id = wbrr.id LEFT JOIN ws on ws.id = wbrr._id)"
Once again it works fine in pgadmin but once I use it as a JPA Formula annotation it throws an error. Thanks!