I am attempting to use a named query against a Postgres database to select all rows with a given UUID (being used as a foreign key). Here is the named query that is being called.
@NamedNativeQuery(name = "getAllXByFK",
query = "SELECT * FROM table n WHERE FK = :param",
resultClass = Foobar.class)})
I set the parameter using the java.util.UUID type.
query.setParameter(param.getKey(), param.getValue());
When I go to get the ResultSet with query.list()
the following error is reported:
ERROR: operator does not exist: uuid = bytea
Any suggestions?