I have a stored procedure which returns me more than one result set. The output varies for different inputs to the stored procedure.
当我把所储存的程序单独提一下(2个运行)并附上不同的投入时,它将按预期返回。
When I call them twice withing a same method,it is returning the same value.
@NamedNativeQuery(
name = "getFees",
query = "call SCHEMA1.RES_FEES(:id,:type,:orig,:dest)",
resultClass = Fees.class)
For ex: id=1, type="R", orig="Vegas" dest="London" it returns fee to be $100 for id=2, type="V", orig="London" dest="Vegas" it returns fee to be $90
When i execute the SP with with ip1 separately it returns $100 When i execute the SP with with ip2 separately it returns $90
But when i execute the SP twice withing a same method in JAVA with different sets of input, it returns $100 twice.
What could be the problem?