Hi all,
I've ran into a problem yesterday when trying to switch my mapping from annotations to HBM xml file. Since then all my JPA criteria based queries won't work.
My entities were mapped using JPA standard annotations, and some Hibernate specifics where set (@Sort for sortedSets for instance). All my Criteria queries where working just fine, nothing to declare.
I tried to remove the annotations and replace them with HBM mapping and so far I encountered 2 problems.
Code:
Path<Long> fileId = bf.get("fileId");
won't work. Hibernate cannot resolve any ID to create a Path. resolving normal properties just works fine.
Code:
Root<Batch> b = cq.from(Batch.class);
produces a corrupted JPA-QL query:
Code:
select alias from null alias where ...
mapping with orm.xml seems to work fine though.
Is that a known bug for hibernate (I'm using 3.6.4-FINAL)? Is there any documentation explaining this behavior?
Thank you for your help.