-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bulk update not working for hibernate/JPA
PostPosted: Sat Aug 27, 2011 4:04 am 
Newbie

Joined: Sat Aug 27, 2011 3:49 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.