This questions is the same as this one with a twist.
I have an interface such as :
@Repository
public interface InvoiceRepository extends JpaRepository<Invoice, String>{
// some other methods here
default Invoice save(Invoice invoice) {
//I do sth here
return JpaRepository.super.save(invoice); // wonT work
}
}
How can i call the save method of the implemented JPA interface?
Update:
Indeed i noticed, save is not a default in the extended JPARepository
interface
In this case, what would be the best way of achieving this ?
override save method
call the parent save method in the overridden method