Transaction silently rolled back

60 Views Asked by At
@Modifying     
@Transactional
@Query("DELETE FROM BusinessTransaction bt WHERE bt.userId.id=:id")     
void deleteByUserId(Long id); 

For this query I am getting the following error:

Transaction silently rolled back because it has been marked as rollback-only

In this query userID is an object of User class joined and mapped with BusinessTransaction class, so in the where condition I am trying to fetch id of user from userId.id and it should be same as :id variable.

Can anyone please help me resolve this error?

0

There are 0 best solutions below