It may be due to the @Id in entity is not correct. The repo will automatically cache the data with the @Id. To solve this issue. You may consider using @IdClass to address this composite key issue.