@Test public void testCrud() { setup(); CategoryAttribute found = categoryAttributeDAO.findById(init.getId()); System.out.println(found); assertThat(found).isNotNull(); CategoryAttribute c = create(1, 2); categoryAttributeDAO.create(c); List<CategoryAttribute> founds = categoryAttributeDAO.listByCategoryId(1l); assertThat(founds).isNotEmpty().hasSize(2); }
public List<CategoryAttribute> listByCategoryId(Long categoryId) { return getSqlSession().selectList(sqlId("listByCategoryId"), categoryId); }
CategoryAttributeDAO extends MyBatisDAO<CategoryAttribute> { public List<CategoryAttribute> listByCategoryId(Long categoryId) { return getSqlSession().selectList(sqlId("listByCategoryId"), categoryId); } }
CategoryAttributeDAO extends MyBatisDAO<CategoryAttribute> { public List<CategoryAttribute> listByCategoryId(Long categoryId) { return getSqlSession().selectList(sqlId("listByCategoryId"), categoryId); }  }
CategoryAttributeDAO extends MyBatisDAO<CategoryAttribute> { public List<CategoryAttribute> listByCategoryId(Long categoryId) { return getSqlSession().selectList(sqlId("listByCategoryId"), categoryId); }  List<CategoryAttribute> listByCategoryId(Long categoryId); }
CategoryAttributeDAO extends MyBatisDAO<CategoryAttribute> { public List<CategoryAttribute> listByCategoryId(Long categoryId) { return getSqlSession().selectList(sqlId("listByCategoryId"), categoryId); }  List<CategoryAttribute> listByCategoryId(Long categoryId);  }