EclipseLink version: 2.3.1
Invocations of my stored function using the @NamedPLSQLStoredFunctionQuery aren’t running correctly. It could be because I haven’t wired it correctly.
Is the following is correct? If the query is defined as:
@NamedPLSQLStoredFunctionQueries (
value= {
@NamedPLSQLStoredFunctionQuery(
name = "removeFromLinkedGroup",
functionName = "gpors_relations.remove_from_linked_group",
parameters = {
@PLSQLParameter(name = "p_group_id"),
@PLSQLParameter(name = "p_reg_id")
},
returnParameter = @PLSQLParameter(name="ret_val"))
})
The Java method that invokes it goes like:
public boolean removeFromLinkedGroup(final Long linkedGroupId, final
Long regId) {
String retval = null;
Query query = entityManager.createNamedQuery("removeFromLinkedGroup");
query.setParameter("p_group_id", linkedGroupId);
query.setParameter("p_reg_id", regId);
query.setParameter("ret_val", retval);
query.executeUpdate();
return "Y".equals(retval);
}
I am especially unsure about the setting of the return value. Could that be what’s tripping it up?
Thanks,
Sri