Hi,
I am using Hibernate as the JPA provider. In the persistence.xml if I set the property hibernate.query.factory_class to org.hibernate.hql.classic.ClassicQueryTranslatorFactory then I cannot use Update as JPA queries. I changed the property to org.hibernate.hql.ast.ASTQueryTranslatorFactory, now Update works as JPA queries. However it fails with org.hibernate.PropertyAccessException: could not get a field value by reflection getter of <Object> for queries where the id field is not explicit. select xe from CountryState xe where xe.isoCountry = :isoCountryCode while if I change the query to select xe from CountryState xe where xe.isoCountry.id = :isoCountryCode it works fine.
Regards Sarit
|