I have a dao called fr.corp.dao.Book
I have a mapped bean also called fr.corp.bean.Book
In my Book dao I have a criteria request like :
Code:
DetachedCriteria criteria = DetachedCriteria.forClass(Book.class);
so yes after a few hours I realised the error was Book.class was refering to the dao instead of the bean, so I fixed it with :
Code:
DetachedCriteria criteria = DetachedCriteria.forClass(fr.corp.bean.Book.class);
and also renamed the dao as BookDaoImpl to not be bothered again
However Hibernate never thrown an exception at all !! It just returned an empty list.
Shouldn't it have thrown a fr.corp.dao.Book is not a mapped class ???