diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/repository/IbanMasterRepository.java b/src/main/java/it/gov/pagopa/apiconfig/starter/repository/IbanMasterRepository.java index 05c2938..f2e4341 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/repository/IbanMasterRepository.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/repository/IbanMasterRepository.java @@ -26,6 +26,13 @@ public interface IbanMasterRepository extends JpaRepository { void deleteByIds(List ids); + @Query("select master from IbanMaster master, IbanAttributeMaster attribute, IbanAttribute label " + + "where master.objId = attribute.fkIbanMaster " + + "and attribute.fkAttribute = label.objId " + + "and master.fkPa=?1 " + + "and attribute.ibanAttribute.attributeName=?2") + List findByFkPaAndLabel(Long fkPa, String label); + @Query("select master from IbanMaster master, IbanAttributeMaster attribute, IbanAttribute label " + "where master.objId = attribute.fkIbanMaster " + "and attribute.fkAttribute = label.objId " +