Reputation: 83
Query is working Sql
@Query("UPDATE A SET A.No=(SELECT * FROM f_SP(tn,year,'name','1'))
,A.status=7 WHERE id=:id")
A saveObject(@Param("year") Integer year, @Param("tn") Long tn,
@Param("name") String name, @Param("id") Long id);
Upvotes: 0
Views: 97
Reputation: 149
You may need to separate out the stored proc query and the update query at repository level like this :
@Procedure(procedureName = "f_SP")
Long reconcileEOMAndPIPSP(Long tn, String name, 'name','1');
@Query("UPDATE A SET A.No= :spResult ,A.status=7 WHERE id=:id")
A saveObject(@Param("spResult") Long spResult, @Param("id") Long id);
and wire then together at the calling class.
Upvotes: 1