说,我们有一个名为person的类
public class Person{
private String name;
private boolean active;
}
当我呼叫personRepository.findByName("John Doe")
时,结果应该是名称为John Doe且活动对象为True
的对象。同时,当personRepository.findByNameAndactive("John Doe",false)
时,它应返回所有带有John Doe和active = false
有什么办法吗?