@RequestMapping("{id}/subCategories") public List<Category> models(@PathVariable Integer id) { return categoryRepository.findByParentInAndEnabledIsTrue(categoryRepository.findOne(id)); }
@RequestMapping("level1") public List<Category> level1() { return categoryRepository.findByParentIsNullAndEnabledIsTrue(); }