openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Żoch (JIRA) <>
Subject [jira] Created: (OPENJPA-533) Bulk update can`t set null embedded object
Date Thu, 06 Mar 2008 12:00:57 GMT
Bulk update can`t set null embedded object

                 Key: OPENJPA-533
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
    Affects Versions: 1.0.0
         Environment: Bea Weblogic 10.0 MP1
            Reporter: Jacek Żoch

Entity :
@Table(name = "JOBS_APPLICATION")
@NamedQuery(name = "Application_resetByUserId", query = "UPDATE Application a SET a.user =
NULL WHERE = :userId")

public class Application {
    @JoinColumn(name = "ID_USER", nullable = true)
    private User user;

execting named query 

      final long pUserId =  10 ;

        int result = em.createNamedQuery("Application_resetByUserId")
        .setParameter("userId", pUserId).executeUpdate() ;


<1.0.0 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error
occurred while parsing the query filter "UPDATE Application a SET a.user = null WHERE
= :userId". Error message: Expression "UPDATEVALUE" requires at least one child.
	at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.firstChild(
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.onlyChild(
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.evalSetClause(
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getQueryExpressions(
	at org.apache.openjpa.kernel.jpql.JPQLParser.eval(
	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.<init>(
	at org.apache.openjpa.kernel.ExpressionStoreQuery.newDataStoreExecutor(
	at org.apache.openjpa.datacache.QueryCacheStoreQuery.newDataStoreExecutor(
	at org.apache.openjpa.kernel.QueryImpl.createExecutor(
	at org.apache.openjpa.kernel.QueryImpl.compileForDataStore(
	at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(
	at org.apache.openjpa.kernel.QueryImpl.compile(
	at kodo.kernel.KodoQuery.compile(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message