I am trying to get values from my stored procedure. And I am using below in my repository
@Repository
public interface SPExecuter extends JpaRepository<Communication,Long> {
@Procedure(name = "getMessages")
public List<Communication> getMessages(@Param("caseId") long caseId);
}
But always I get the first row duplicated when I execute
[
{
“fromId”: 1,
“toId”: 2,
“message”: “hey There “,
“messageDirection”: “I”,
“caseId”: 7,
“messageFk”: 7
},
{
“fromId”: 1,
“toId”: 2,
“message”: “hey There “,
“messageDirection”: “I”,
“caseId”: 7,
“messageFk”: 7
}
]
Where as I have different result set coming from my stored procedure. how do I counter this where am I going wrong
Was expecting
but I am getting (https://i.sstatic.net/fzS7cQl6.png)
Yashas Chandra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.