Deprecation of Hibernate Criteria and how we can still prevent it

No i cant, when i define hbm mapping like the example i gave before, hibernate complains with this exception:
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: ConceptDto is not mapped [select generatedAlias0 from ConceptDto as generatedAlias0 where generatedAlias0.id=10]
But if i use annotations in ConceptoDto class like you suggested, it works as expected. So @Entity in a class or hbm mapping is not the same thing perhaps.

Well, it was really necessary to implement jpa? why dont you just continue with criteria api and ignore jpa? Maybe there is something here that we dont know which forces you to implement jpa instead of continue with criteria api. Hibernate was fabulous without jpa at first, now continue being fabulous with some headache hehe.

Again, is not true at all. Once i define a var somVar = ArrayList<Integer>(); and infered type is assigned i can not assign that var to another type somVar = ArrayList<String>();, so var keyword is just sugar syntax for avoiding write the original full type but has no real benefit. What i mean by typed-vars is that i have to define a lot of CriteriaQuery<Someclass> and Root<Someclass> variables inside a logic method, some times more than 10 queries for different objects, so i have a lot of vars and many times it gets confused and frustrating writing a jpa query because it is soooooo verbose and unclear. As the opposite side very good for the compiler and that’s it. I dont see the real gain writing a strong typed query for an output that will be parsed in the sql engine.

Thanks