अब तक मैं के साथ 2 गुणों के साथ केवल एक मामले के साथ काम कर रहा है के रूप में तार्किक ऑपरेटर के साथ कार्य करना तो मैं इतनाहाइबरनेट अनेक AND और तार्किक साथ मानदंड
Criterion eqRef = Restrictions.eq("referenceID", referenceId);
Criterion eqType = Restrictions.eq("verificationType", type);
LogicalExpression and = Restrictions.and(eqRef, eqType);
अपने 2 की तुलना में अधिक के साथ इस बार की तरह LogicalExpression का उपयोग तो मैं थोड़ा इस बार confused.say मैं उपयोगकर्ता नाम संपत्ति जोड़ दिया है मैं
session.createCriteria(this.getPersistentClass())
.add(Restrictions.eq("referenceID", referenceId))
.add(Restrictions.eq("verificationType", type))
.add(Restrictions.eq("username", username))
.list();
के साथ सामान्य श्रृंखलन कर सकते हैं कर रहा हूँ, लेकिन अब मैं तार्किक ऑपरेटर किस तरह की them.i'm के बीच इस्तेमाल किया पता नहीं है ऐसा करने के लिए भी लुभाना:
Criterion eqRef = Restrictions.eq("referenceID", referenceId);
Criterion eqType = Restrictions.eq("verificationType", type);
Criterion equsername = Restrictions.eq("username", username);
LogicalExpression and = Restrictions.and(eqRef, eqType);
LogicalExpression secondand = Restrictions.and(and, equsername);
मैंने eqAll भी देखा है, लेकिन मैंने पहले कभी इसका उपयोग नहीं किया है। तो क्या आपको इसके बारे में कोई जानकारी है? आप इसे कैसे करते हैं, और इसे पढ़ने के लिए धन्यवाद।
धन्यवाद dude.Really –