Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PSPlacement{
- static transients = [
- "categoryHierarchy"
- }
- def String getCategoryHierarchy(){
- return this.getCategoriesForPlacement()?.join('>')
- }
- def getCategoriesForPlacement(){
- if(category)
- return Category.executeQuery("SELECT ......")
- return []
- }
- static searchable = {
- all false
- categoryHierarchy index: "not_analyzed", name: "categoryHierarchy", store: "no"
- categoryHierarchy index: "not_analyzed", name: "categoryHierarchySort", store: "no"
- }
- }
Add Comment
Please, Sign In to add comment