Skip to content

Commit

Permalink
Merge pull request #651 from Shilpa-Manjunath/locationbug
Browse files Browse the repository at this point in the history
Mosip-19954 Issue when we create a location with the same name with d…
  • Loading branch information
nayakrounak authored Feb 15, 2022
2 parents 25e93e4 + 06eb0c5 commit 9a9a62b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ List<Location> findLocationByHierarchyLevelStartsWith(Short hierarchyLevel, Stri
@Query("FROM Location l WHERE l.name=?1 AND l.hierarchyLevel=?2 ")
List<Location> findByNameAndLevel(String name, Short hierarchyLevel);

@Query("FROM Location l WHERE l.name=?1 AND l.hierarchyLevel=?2 AND l.langCode=?3")
@Query("FROM Location l WHERE l.name=?1 AND l.hierarchyLevel=?2 AND l.langCode=?3 and(l.isDeleted is null or l.isDeleted=false)")
List<Location> findByNameAndLevelLangCode(String name, Short hierarchyLevel, String langCode);

@Query("FROM Location l WHERE l.name=?1 AND l.parentLocCode=?2 AND l.hierarchyLevel=?3 AND l.langCode=?4 AND l.isActive=true" )
@Query("FROM Location l WHERE l.name=?1 AND l.parentLocCode=?2 AND l.hierarchyLevel=?3 AND l.langCode=?4 AND (l.isDeleted is null or l.isDeleted=false)" )
List<Location> findByNameParentCodeAndLevelLangCode(String name, String parentCode,Short hierarchyLevel, String langCode);


Expand Down

0 comments on commit 9a9a62b

Please sign in to comment.