简单条件查询
- 查询方法必须以find|read|get开头,
- 涉及条件查询时,条件的属性同条件之间用关键字连接,条件属性首字母大写
支持属性级联查询,当当前类又符合条件的属性时,优先使用当前类属性,而不使用级联属性;若需要使用级联属性 属性之间使用_连接
支持的关键字如下
- 实列展示
//where name like ?% and id < ?
List<Person> getByNameStartingWithAndIdLessThan(String Name, Integer id);
// where email in(?,?,?) or birth <?;
List<Person> getByEmailInOrBrithLessThan(List<String> email ,Date date);
//where a.id > ? 级联属性的id(新的实体)
List<Person> getByAddressIdGreaterThan(Integer id);
PS: 进行相关测试即可 ,可参照上一节测试例子