[jboss-user] [EJB 3.0] - No joins on an update

SmokingAPipe do-not-reply at jboss.com
Tue Mar 20 14:28:29 EDT 2007


I'm trying to do a bulk update query like this:

update Foo
  |     set status = 99 
  |     where address.city = :x
  | 

This isn't working.  It's throwing an SQL error:

javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute update query
  | caused by
  | org.postgresql.util.PSQLException: ERROR: syntax error at or near ","

(I'm only posting the two relevant lines here.)

I looked at the http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/batch.html#batch-direct and saw:

anonymous wrote : No joins (either implicit or explicit) can be specified in a bulk EJB-QL query.

I assume this is the limitation I'm running into here.

Should I re-write this as a native query?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029937#4029937

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029937



More information about the jboss-user mailing list