こんにちは、私は次のクラスを持っています
public class Label
{
private Long TableId;
private Long Id;
private String LabelName;
//getters and setters for corresponding fields
}
複数のフィールドを動的に検索することになっていたのですが、休止状態のクエリを例に出くわし、私のコードは何かのように見えます
Label bean =new Label();
if(Id!=null)
{
bean.setId(Id);
}
if(LabeName!=null)
{
bean.setLabelName(LabelName)
}
System.out.println(bean.toString());
Example exampleObject=Example.create(bean).ignoreCase();
criteria=currentSessionObj.createCriteria(Label.class).add(exampleObject);
retObjects=criteria.list();
LabelName フィールドで検索すると、正確な応答が得られます ID で検索しようとすると、 予期しない結果が返されます 多くのフォーラムをゴーグルしました 欲しいものが得られませんでした 対処方法を教えてくださいこの問題で?