Greetings I write REST services. On Oracle, a database has a function that returns an object of type EXP_TYPE , which is also defined on the database:
function GET_EXP_TYPE(pID in EXP_TYPE.ID%TYPE) return PKG_TYP.EXP_TYPE pipelined; My task is to simply call this function on native SQL , without using the Criteria API.
The general idea is clear, but so far it has not been possible to make an intelligible list of the sequence of actions of the type (very approximately):
Query = entityManager.createNamedQuery("TO CALL PROCEDURE", aResultClass);Прописать result-set-mappingПрописать приведение STRUCT к тому что мне нужно
Besides, I can not systematically organize it. Will you help by example? Or code.
Listen, I ask the second question of this kind and no answer or comment. Does nobody know anything?
JPA: Hibernate 5.0.10
IDE: JBoss Dev Studio
entityManager.createNamedQuery("SELECT * FROM ...", aResultClass);- Kiryl Aleksandrovich