hello! My Criteria does not return the id of the object, I need to load the object by email I have this:
Code:
public Contato load(Contato contato) {
Criteria crit = session.createCriteria(Contato.class)
.add(Restrictions.ilike("email", contato.getEmail(), MatchMode.EXACT));
return (Contato) crit.uniqueResult();
//return (Contato) session.load(Contato.class, contato.getEmail());
}
This is the print:
Is returning the idContato is null. =/
I tried using the load method and Criteria unsuccessfully.
Can anyone help?
Thank You!