So, I have a problem with my criteria
There are 2 classes : Request and Enterprise
Request :
private Integer idRequest;
private Enterprise enterprise;
Enterprise :
private Integer idEnterprise;
private String enterName;
I would like to make a criteria to find the Request id from the Enterprise id.
Code:
Criteria criter = this.Session.createCriteria(Request.class).createCriteria("enterprise").add(Restrictions.eq("idEnterprise", new Integer(idEnter)))
This is the code that I make but it return nothing ! Whereas there is a lot of record in the db ...
Thanks