I am trying to execute a delete statement on a table with a where clause that requires Hibernate to create a join.
If I execute a select with the same where the query is generated correctly.
Here are the working select and the non-working delete statements:
Code:
entityManager.createQuery("select dodm from DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1")
.setParameter(1, getTaskId())
.getResultList();
entityManager.createQuery("delete DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1")
.setParameter(1, getTaskId())
.executeUpdate();
Here is the output (showsql) of the two statements:
Code:
Hibernate:
/* select
dodm
from
DatabaseObjectDataMapping dodm
where
dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1 */ select
databaseob0_.COLUMN_NAME as COLUMN1_89_,
databaseob0_.DATABASE_OBJECT_DATA_ID as DATABASE4_89_,
databaseob0_.COLUMN_MAPPING as COLUMN2_89_,
databaseob0_.USE_SOURCE as USE3_89_
from
database_object_data_mapping databaseob0_,
database_object_data databaseob1_
where
databaseob0_.DATABASE_OBJECT_DATA_ID=databaseob1_.DATABASE_OBJECT_DATA_ID
and databaseob1_.TASK_ID=?
Hibernate:
delete
from
database_object_data_mapping,
database_object_data databaseob1_
where
TASK_ID=?
16:57:08 WARN JDBCExceptionReporter - SQL Error: 933, SQLState: 42000
16:57:08 ERROR JDBCExceptionReporter - ORA-00933: SQL command not properly ended
The delete statement was supposed to be generated like so:
Code:
delete from
(select
dodm.COLUMN_NAME as COLUMN1_89_,
dodm.DATABASE_OBJECT_DATA_ID as DATABASE4_89_,
dodm.COLUMN_MAPPING as COLUMN2_89_,
dodm.USE_SOURCE as USE3_89_
from
database_object_data_mapping dodm,
database_object_data dod
where
dodm.DATABASE_OBJECT_DATA_ID=dod.DATABASE_OBJECT_DATA_ID
and dod.TASK_ID=1)
Hibernate version: Hibernate Annotations 3.3.1.GA
Hibernate 3.2.6.GA
Hibernate EntityManager 3.3.2.GA
This is debug level log of starting with the execution of the select statement and than the delete statement:17:00:11 DEBUG QueryPlanCache - unable to locate HQL query plan in cache; generating (select dodm from DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1)
17:00:11 DEBUG QueryTranslatorImpl - parse() - HQL: select dodm from com.comp.main.service.beans.persistence.DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1
17:00:11 DEBUG AST - --- HQL AST ---
\-[QUERY] 'query'
+-[SELECT_FROM] 'SELECT_FROM'
| +-[FROM] 'from'
| | \-[RANGE] 'RANGE'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[DOT] '.'
| | | | | +-[DOT] '.'
| | | | | | +-[DOT] '.'
| | | | | | | +-[DOT] '.'
| | | | | | | | +-[IDENT] 'com'
| | | | | | | | \-[IDENT] 'comp'
| | | | | | | \-[IDENT] 'main'
| | | | | | \-[IDENT] 'service'
| | | | | \-[IDENT] 'beans'
| | | | \-[IDENT] 'persistence'
| | | \-[IDENT] 'DatabaseObjectDataMapping'
| | \-[ALIAS] 'dodm'
| \-[SELECT] 'select'
| \-[IDENT] 'dodm'
\-[WHERE] 'where'
\-[EQ] '='
+-[DOT] '.'
| +-[DOT] '.'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[IDENT] 'dodm'
| | | | \-[IDENT] 'databaseObjectDataMappingPK'
| | | \-[IDENT] 'databaseObjectData'
| | \-[IDENT] 'task'
| \-[IDENT] 'taskId'
\-[PARAM] '?'
\-[NUM_INT] '1'
17:00:11 DEBUG ErrorCounter - throwQueryException() : no errors
17:00:11 DEBUG HqlSqlBaseWalker - select << begin [level=1, statement=select]
17:00:11 DEBUG FromElement - FromClause{level=1} : com.comp.main.service.beans.persistence.DatabaseObjectDataMapping (dodm) -> databaseob0_
17:00:11 DEBUG FromReferenceNode - Resolved : dodm -> (databaseob0_.COLUMN_NAME, databaseob0_.DATABASE_OBJECT_DATA_ID)
17:00:11 DEBUG FromReferenceNode - Resolved : dodm -> (databaseob0_.COLUMN_NAME, databaseob0_.DATABASE_OBJECT_DATA_ID)
17:00:11 DEBUG FromElement - handling property dereference [com.comp.main.service.beans.persistence.DatabaseObjectDataMapping (dodm) -> databaseObjectDataMappingPK (class)]
17:00:11 DEBUG DotNode - getDataType() : databaseObjectDataMappingPK -> org.hibernate.type.ComponentType@d9cc1a
17:00:11 DEBUG DotNode - Unresolved property path is now 'databaseObjectDataMappingPK.databaseObjectData'
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK -> databaseob0_.DATABASE_OBJECT_DATA_ID
17:00:11 DEBUG DotNode - getDataType() : databaseObjectDataMappingPK.databaseObjectData -> org.hibernate.type.ManyToOneType(com.comp.main.service.beans.persistence.DatabaseObjectData)
17:00:11 DEBUG DotNode - dereferenceEntityJoin() : generating join for databaseObjectData in com.comp.main.service.beans.persistence.DatabaseObjectDataMapping {no alias} parent = [ ( . ( . ( databaseob0_.DATABASE_OBJECT_DATA_ID (databaseob0_.COLUMN_NAME, databaseob0_.DATABASE_OBJECT_DATA_ID) databaseObjectDataMappingPK ) databaseObjectData ) task ) ]
17:00:11 DEBUG FromElement - FromClause{level=1} : com.comp.main.service.beans.persistence.DatabaseObjectData (no alias) -> databaseob1_
17:00:11 DEBUG FromClause - addJoinByPathMap() : dodm.databaseObjectDataMappingPK.databaseObjectData -> database_object_data databaseob1_
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK.databaseObjectData -> databaseob0_.DATABASE_OBJECT_DATA_ID
17:00:11 DEBUG FromElement - handling property dereference [com.comp.main.service.beans.persistence.DatabaseObjectData (null) -> task (class)]
17:00:11 DEBUG DotNode - getDataType() : task -> org.hibernate.type.ManyToOneType(com.comp.main.service.beans.persistence.Task)
17:00:11 DEBUG DotNode - dereferenceShortcut() : property taskId in com.comp.main.service.beans.persistence.DatabaseObjectData does not require a join.
17:00:11 DEBUG DotNode - Unresolved property path is now 'task.taskId'
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK.databaseObjectData.task -> databaseob1_.TASK_ID
17:00:11 DEBUG DotNode - getDataType() : task.taskId -> org.hibernate.type.IntegerType@79a340
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId -> databaseob1_.TASK_ID
17:00:11 DEBUG HqlSqlBaseWalker - select : finishing up [level=1, statement=select]
17:00:11 DEBUG HqlSqlWalker - processQuery() : ( SELECT ( {select clause} (databaseob0_.COLUMN_NAME, databaseob0_.DATABASE_OBJECT_DATA_ID) ) ( FromClause{level=1} database_object_data_mapping databaseob0_ database_object_data databaseob1_ ) ( where ( = ( databaseob1_.TASK_ID ( databaseob1_.TASK_ID ( databaseob0_.DATABASE_OBJECT_DATA_ID ( databaseob0_.DATABASE_OBJECT_DATA_ID (databaseob0_.COLUMN_NAME, databaseob0_.DATABASE_OBJECT_DATA_ID) databaseObjectDataMappingPK ) databaseObjectData ) task ) taskId ) ? ) ) )
17:00:11 DEBUG JoinProcessor - Using FROM fragment [database_object_data_mapping databaseob0_]
17:00:11 DEBUG SyntheticAndFactory - Using WHERE fragment [databaseob0_.DATABASE_OBJECT_DATA_ID=databaseob1_.DATABASE_OBJECT_DATA_ID]
17:00:11 DEBUG HqlSqlBaseWalker - select >> end [level=1, statement=select]
17:00:11 DEBUG AST - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (database_object_data,database_object_data_mapping)
+-[SELECT_CLAUSE] SelectClause: '{select clause}'
| +-[ALIAS_REF] IdentNode: 'databaseob0_.COLUMN_NAME as COLUMN1_29_, databaseob0_.DATABASE_OBJECT_DATA_ID as DATABASE4_29_' {alias=dodm, className=com.comp.main.service.beans.persistence.DatabaseObjectDataMapping, tableAlias=databaseob0_}
| \-[SQL_TOKEN] SqlFragment: 'databaseob0_.COLUMN_MAPPING as COLUMN2_29_, databaseob0_.USE_SOURCE as USE3_29_'
+-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=2, fromElements=2, fromElementByClassAlias=[dodm], fromElementByTableAlias=[databaseob0_, databaseob1_], fromElementsByPath=[dodm.databaseObjectDataMappingPK.databaseObjectData], collectionJoinFromElementsByPath=[], impliedElements=[]}
| +-[FROM_FRAGMENT] FromElement: 'database_object_data_mapping databaseob0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=dodm,role=null,tableName=database_object_data_mapping,tableAlias=databaseob0_,origin=null,colums={,className=com.comp.main.service.beans.persistence.DatabaseObjectDataMapping}}
| \-[FROM_FRAGMENT] ImpliedFromElement: 'database_object_data databaseob1_' ImpliedFromElement{implied,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=database_object_data,tableAlias=databaseob1_,origin=database_object_data_mapping databaseob0_,colums={databaseob0_.DATABASE_OBJECT_DATA_ID ,className=com.comp.main.service.beans.persistence.DatabaseObjectData}}
\-[WHERE] SqlNode: 'where'
+-[THETA_JOINS] SqlNode: '{theta joins}'
| \-[SQL_TOKEN] SqlFragment: 'databaseob0_.DATABASE_OBJECT_DATA_ID=databaseob1_.DATABASE_OBJECT_DATA_ID'
\-[EQ] BinaryLogicOperatorNode: '='
+-[DOT] DotNode: 'databaseob1_.TASK_ID' {propertyName=taskId,dereferenceType=4,propertyPath=task.taskId,path=dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId,tableAlias=databaseob1_,className=com.comp.main.service.beans.persistence.DatabaseObjectData,classAlias=null}
| +-[DOT] DotNode: 'databaseob1_.TASK_ID' {propertyName=taskId,dereferenceType=ROOT_LEVEL,propertyPath=task.taskId,path=dodm.databaseObjectDataMappingPK.databaseObjectData.task,tableAlias=databaseob1_,className=com.comp.main.service.beans.persistence.DatabaseObjectData,classAlias=null}
| | +-[DOT] DotNode: 'databaseob0_.DATABASE_OBJECT_DATA_ID' {propertyName=databaseObjectData,dereferenceType=1,propertyPath=databaseObjectDataMappingPK.databaseObjectData,path=dodm.databaseObjectDataMappingPK.databaseObjectData,tableAlias=databaseob1_,className=com.comp.main.service.beans.persistence.DatabaseObjectData,classAlias=null}
| | | +-[DOT] DotNode: 'databaseob0_.DATABASE_OBJECT_DATA_ID' {propertyName=databaseObjectData,dereferenceType=2,propertyPath=databaseObjectDataMappingPK.databaseObjectData,path=dodm.databaseObjectDataMappingPK,tableAlias=databaseob0_,className=com.comp.main.service.beans.persistence.DatabaseObjectDataMapping,classAlias=dodm}
| | | | +-[ALIAS_REF] IdentNode: '(databaseob0_.COLUMN_NAME, databaseob0_.DATABASE_OBJECT_DATA_ID)' {alias=dodm, className=com.comp.main.service.beans.persistence.DatabaseObjectDataMapping, tableAlias=databaseob0_}
| | | | \-[IDENT] IdentNode: 'databaseObjectDataMappingPK' {originalText=databaseObjectDataMappingPK}
| | | \-[IDENT] IdentNode: 'databaseObjectData' {originalText=databaseObjectData}
| | \-[IDENT] IdentNode: 'task' {originalText=task}
| \-[IDENT] IdentNode: 'taskId' {originalText=taskId}
\-[NAMED_PARAM] ParameterNode: '?' {name=1, expectedType=org.hibernate.type.IntegerType@79a340}
17:00:11 DEBUG ErrorCounter - throwQueryException() : no errors
17:00:11 DEBUG QueryTranslatorImpl - HQL: select dodm from com.comp.main.service.beans.persistence.DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1
17:00:11 DEBUG QueryTranslatorImpl - SQL: select databaseob0_.COLUMN_NAME as COLUMN1_29_, databaseob0_.DATABASE_OBJECT_DATA_ID as DATABASE4_29_, databaseob0_.COLUMN_MAPPING as COLUMN2_29_, databaseob0_.USE_SOURCE as USE3_29_ from database_object_data_mapping databaseob0_, database_object_data databaseob1_ where databaseob0_.DATABASE_OBJECT_DATA_ID=databaseob1_.DATABASE_OBJECT_DATA_ID and databaseob1_.TASK_ID=?
17:00:11 DEBUG ErrorCounter - throwQueryException() : no errors
17:00:11 DEBUG HQLQueryPlan - HQL param location recognition took 0 mills (select dodm from DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1)
17:00:11 DEBUG QueryPlanCache - located HQL query plan in cache (select dodm from DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1)
17:00:11 DEBUG HQLQueryPlan - find: select dodm from DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1
17:00:11 DEBUG QueryParameters - named parameters: {1=304}
17:00:11 DEBUG AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
17:00:11 DEBUG SQL -
/* select
dodm
from
DatabaseObjectDataMapping dodm
where
dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1 */ select
databaseob0_.COLUMN_NAME as COLUMN1_29_,
databaseob0_.DATABASE_OBJECT_DATA_ID as DATABASE4_29_,
databaseob0_.COLUMN_MAPPING as COLUMN2_29_,
databaseob0_.USE_SOURCE as USE3_29_
from
database_object_data_mapping databaseob0_,
database_object_data databaseob1_
where
databaseob0_.DATABASE_OBJECT_DATA_ID=databaseob1_.DATABASE_OBJECT_DATA_ID
and databaseob1_.TASK_ID=?
Hibernate:
/* select
dodm
from
DatabaseObjectDataMapping dodm
where
dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1 */ select
databaseob0_.COLUMN_NAME as COLUMN1_29_,
databaseob0_.DATABASE_OBJECT_DATA_ID as DATABASE4_29_,
databaseob0_.COLUMN_MAPPING as COLUMN2_29_,
databaseob0_.USE_SOURCE as USE3_29_
from
database_object_data_mapping databaseob0_,
database_object_data databaseob1_
where
databaseob0_.DATABASE_OBJECT_DATA_ID=databaseob1_.DATABASE_OBJECT_DATA_ID
and databaseob1_.TASK_ID=?
17:00:11 DEBUG AbstractBatcher - preparing statement
17:00:11 DEBUG IntegerType - binding '304' to parameter: 1
17:00:11 DEBUG AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
17:00:11 DEBUG Loader - processing result set
17:00:11 DEBUG Loader - done processing result set (0 rows)
17:00:11 DEBUG AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
17:00:11 DEBUG AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
17:00:11 DEBUG AbstractBatcher - closing statement
17:00:11 DEBUG Loader - total objects hydrated: 0
17:00:11 DEBUG StatefulPersistenceContext - initializing non-lazy collections
17:00:11 DEBUG QueryPlanCache - unable to locate HQL query plan in cache; generating (delete DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1)
17:00:11 DEBUG QueryTranslatorImpl - parse() - HQL: delete com.comp.main.service.beans.persistence.DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1
17:00:11 DEBUG AST - --- HQL AST ---
\-[DELETE] 'delete'
+-[FROM] 'FROM'
| \-[RANGE] 'RANGE'
| +-[DOT] '.'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[DOT] '.'
| | | | | +-[DOT] '.'
| | | | | | +-[DOT] '.'
| | | | | | | +-[IDENT] 'com'
| | | | | | | \-[IDENT] 'comp'
| | | | | | \-[IDENT] 'main'
| | | | | \-[IDENT] 'service'
| | | | \-[IDENT] 'beans'
| | | \-[IDENT] 'persistence'
| | \-[IDENT] 'DatabaseObjectDataMapping'
| \-[ALIAS] 'dodm'
\-[WHERE] 'where'
\-[EQ] '='
+-[DOT] '.'
| +-[DOT] '.'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[IDENT] 'dodm'
| | | | \-[IDENT] 'databaseObjectDataMappingPK'
| | | \-[IDENT] 'databaseObjectData'
| | \-[IDENT] 'task'
| \-[IDENT] 'taskId'
\-[PARAM] '?'
\-[NUM_INT] '1'
17:00:11 DEBUG ErrorCounter - throwQueryException() : no errors
17:00:11 DEBUG HqlSqlBaseWalker - delete << begin [level=1, statement=delete]
17:00:11 DEBUG FromElement - FromClause{level=1} : com.comp.main.service.beans.persistence.DatabaseObjectDataMapping (dodm) -> databaseob0_
17:00:11 DEBUG FromReferenceNode - Resolved : dodm -> (COLUMN_NAME, DATABASE_OBJECT_DATA_ID)
17:00:11 DEBUG FromElement - handling property dereference [com.comp.main.service.beans.persistence.DatabaseObjectDataMapping (dodm) -> databaseObjectDataMappingPK (class)]
17:00:11 DEBUG DotNode - getDataType() : databaseObjectDataMappingPK -> org.hibernate.type.ComponentType@d9cc1a
17:00:11 DEBUG DotNode - Unresolved property path is now 'databaseObjectDataMappingPK.databaseObjectData'
17:00:11 DEBUG FromElementType - Using non-qualified column reference [databaseObjectDataMappingPK.databaseObjectData -> ([DATABASE_OBJECT_DATA_ID])]
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK -> DATABASE_OBJECT_DATA_ID
17:00:11 DEBUG DotNode - getDataType() : databaseObjectDataMappingPK.databaseObjectData -> org.hibernate.type.ManyToOneType(com.comp.main.service.beans.persistence.DatabaseObjectData)
17:00:11 DEBUG DotNode - dereferenceEntityJoin() : generating join for databaseObjectData in com.comp.main.service.beans.persistence.DatabaseObjectDataMapping {no alias} parent = [ ( . ( . ( DATABASE_OBJECT_DATA_ID (COLUMN_NAME, DATABASE_OBJECT_DATA_ID) databaseObjectDataMappingPK ) databaseObjectData ) task ) ]
17:00:11 DEBUG FromElementType - Using non-qualified column reference [databaseObjectDataMappingPK.databaseObjectData -> ([DATABASE_OBJECT_DATA_ID])]
17:00:11 DEBUG FromElement - FromClause{level=1} : com.comp.main.service.beans.persistence.DatabaseObjectData (no alias) -> databaseob1_
17:00:11 DEBUG FromClause - addJoinByPathMap() : dodm.databaseObjectDataMappingPK.databaseObjectData -> database_object_data databaseob1_
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK.databaseObjectData -> DATABASE_OBJECT_DATA_ID
17:00:11 DEBUG FromElement - handling property dereference [com.comp.main.service.beans.persistence.DatabaseObjectData (null) -> task (class)]
17:00:11 DEBUG DotNode - getDataType() : task -> org.hibernate.type.ManyToOneType(com.comp.main.service.beans.persistence.Task)
17:00:11 DEBUG DotNode - dereferenceShortcut() : property taskId in com.comp.main.service.beans.persistence.DatabaseObjectData does not require a join.
17:00:11 DEBUG FromElementType - Using non-qualified column reference [task -> ([TASK_ID])]
17:00:11 DEBUG DotNode - Unresolved property path is now 'task.taskId'
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK.databaseObjectData.task -> TASK_ID
17:00:11 DEBUG DotNode - getDataType() : task.taskId -> org.hibernate.type.IntegerType@79a340
17:00:11 DEBUG FromReferenceNode - Resolved : dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId -> TASK_ID
17:00:11 DEBUG HqlSqlBaseWalker - delete : finishing up [level=1, statement=delete]
17:00:11 DEBUG HqlSqlBaseWalker - delete >> end [level=1, statement=delete]
17:00:11 DEBUG AST - --- SQL AST ---
\-[DELETE] DeleteStatement: 'delete' querySpaces (database_object_data,database_object_data_mapping)
+-[FROM] FromClause: 'FROM' FromClause{level=1, fromElementCounter=2, fromElements=2, fromElementByClassAlias=[dodm], fromElementByTableAlias=[databaseob0_, databaseob1_], fromElementsByPath=[dodm.databaseObjectDataMappingPK.databaseObjectData], collectionJoinFromElementsByPath=[], impliedElements=[]}
| +-[FROM_FRAGMENT] FromElement: 'database_object_data_mapping' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=dodm,role=null,tableName=database_object_data_mapping,tableAlias=databaseob0_,origin=null,colums={,className=com.comp.main.service.beans.persistence.DatabaseObjectDataMapping}}
| \-[JOIN_FRAGMENT] ImpliedFromElement: 'database_object_data databaseob1_' ImpliedFromElement{implied,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=database_object_data,tableAlias=databaseob1_,origin=database_object_data_mapping,colums={DATABASE_OBJECT_DATA_ID ,className=com.comp.main.service.beans.persistence.DatabaseObjectData}}
\-[WHERE] SqlNode: 'where'
\-[EQ] BinaryLogicOperatorNode: '='
+-[DOT] DotNode: 'TASK_ID' {propertyName=taskId,dereferenceType=4,propertyPath=task.taskId,path=dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId,tableAlias=databaseob1_,className=com.comp.main.service.beans.persistence.DatabaseObjectData,classAlias=null}
| +-[DOT] DotNode: 'TASK_ID' {propertyName=taskId,dereferenceType=ROOT_LEVEL,propertyPath=task.taskId,path=dodm.databaseObjectDataMappingPK.databaseObjectData.task,tableAlias=databaseob1_,className=com.comp.main.service.beans.persistence.DatabaseObjectData,classAlias=null}
| | +-[DOT] DotNode: 'DATABASE_OBJECT_DATA_ID' {propertyName=databaseObjectData,dereferenceType=1,propertyPath=databaseObjectDataMappingPK.databaseObjectData,path=dodm.databaseObjectDataMappingPK.databaseObjectData,tableAlias=databaseob1_,className=com.comp.main.service.beans.persistence.DatabaseObjectData,classAlias=null}
| | | +-[DOT] DotNode: 'DATABASE_OBJECT_DATA_ID' {propertyName=databaseObjectData,dereferenceType=2,propertyPath=databaseObjectDataMappingPK.databaseObjectData,path=dodm.databaseObjectDataMappingPK,tableAlias=databaseob0_,className=com.comp.main.service.beans.persistence.DatabaseObjectDataMapping,classAlias=dodm}
| | | | +-[ALIAS_REF] IdentNode: '(COLUMN_NAME, DATABASE_OBJECT_DATA_ID)' {alias=dodm, className=com.comp.main.service.beans.persistence.DatabaseObjectDataMapping, tableAlias=databaseob0_}
| | | | \-[IDENT] IdentNode: 'databaseObjectDataMappingPK' {originalText=databaseObjectDataMappingPK}
| | | \-[IDENT] IdentNode: 'databaseObjectData' {originalText=databaseObjectData}
| | \-[IDENT] IdentNode: 'task' {originalText=task}
| \-[IDENT] IdentNode: 'taskId' {originalText=taskId}
\-[NAMED_PARAM] ParameterNode: '?' {name=1, expectedType=org.hibernate.type.IntegerType@79a340}
17:00:11 DEBUG ErrorCounter - throwQueryException() : no errors
17:00:11 DEBUG ErrorCounter - throwQueryException() : no errors
17:00:11 DEBUG HQLQueryPlan - HQL param location recognition took 0 mills (delete DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1)
17:00:11 DEBUG QueryPlanCache - located HQL query plan in cache (delete DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1)
17:00:11 DEBUG HQLQueryPlan - executeUpdate: delete DatabaseObjectDataMapping dodm where dodm.databaseObjectDataMappingPK.databaseObjectData.task.taskId = ?1
17:00:11 DEBUG QueryParameters - named parameters: {1=304}
17:00:11 DEBUG AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
17:00:11 DEBUG SQL -
delete
from
database_object_data_mapping,
database_object_data databaseob1_
where
TASK_ID=?
Hibernate:
delete
from
database_object_data_mapping,
database_object_data databaseob1_
where
TASK_ID=?
17:00:11 DEBUG AbstractBatcher - preparing statement
17:00:11 DEBUG IntegerType - binding '304' to parameter: 1
17:00:11 DEBUG AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
17:00:11 DEBUG AbstractBatcher - closing statement
17:00:11 DEBUG JDBCExceptionReporter - could not execute update query [delete from database_object_data_mapping, database_object_data databaseob1_ where TASK_ID=?]
java.sql.SQLException: ORA-00933: SQL command not properly ended[/code]