Skip to content

Instantly share code, notes, and snippets.

@mohashari
Created September 8, 2019 03:58
Show Gist options
  • Select an option

  • Save mohashari/480ff891c99a88927963602e99f135f2 to your computer and use it in GitHub Desktop.

Select an option

Save mohashari/480ff891c99a88927963602e99f135f2 to your computer and use it in GitHub Desktop.
@Query(value = "SELECT new com.monggopesen.mainservice.valueobject.Levels(l1.name , l2.name , l3.name ) FROM Category AS l3 \n" +
"LEFT JOIN Category AS l2 ON l3.parent = l2.secureId \n" +
"LEFT JOIN Category AS l1 ON l2.parent = l1.secureId \n" +
"WHERE l3.secureId = :secureId")
Levels findBreadCrumbLevel3(@Param("secureId") String secureId);
@Query(value = "SELECT new com.monggopesen.mainservice.valueobject.Levels(l1.name , l2.name ) FROM Category AS l2 \n" +
"LEFT JOIN Category AS l1 ON l2.parent = l1.secureId \n" +
"WHERE l2.secureId = :secureId")
Levels findBreadCrumbLevel2(@Param("secureId") String secureId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment