I have a City entity that has a name and a Country object in it, which in turn also has a name.
Apr 16, 2015 3:13:34 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 42001, SQLState: 42001
Apr 16, 2015 3:13:34 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: Syntax error in SQL statement "UPDATE CITY CROSS[*] JOIN SET NAME=? WHERE NAME=? "; expected "., AS, SET"; SQL statement:
update CITY cross join set NAME=? where NAME=? [42001-170]
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771)
at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:87)
at com.mysema.query.jpa.impl.JPAUpdateClause.execute(JPAUpdateClause.java:69)
When I run the update clause without a where(), it works just fine. It's just when I add the where() that I start getting problems.