[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2069) Batch updates doesn't work with custom NamingStrategy

Tomas Andersson (JIRA) noreply at atlassian.com
Mon Sep 11 08:51:25 EDT 2006


Batch updates doesn't work with custom NamingStrategy
-----------------------------------------------------

         Key: HHH-2069
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2069
     Project: Hibernate3
        Type: Bug

  Components: query-hql  
    Versions: 3.2.0.cr2    
 Environment: Hibernate Core CR2, Hibernate EntityManager CR1, MS SQL Server 2000, jTDS
    Reporter: Tomas Andersson


We're using a custom naming strategy which basically adds a table owner to the configured table name, ie. mbr_member becomse iep.mbr_member. We have been using it for a year now without problem. 

But, when we started to use batch updates it failed as it couldn't drop a temporary table created during the batch process
During execution with turned on Sql I only see the line below, there is no line displaying a "select into" statement

Hibernate: insert into #iep.mbr_member select member0_.id_ as id_ from iep.mbr_member member0_ where fk_rol_role=? 

The stacktrace starts with the following statement

ALLVARLIG: Invalid object name '#iep.mbr_member'.
2006-aug-31 08:37:39 org.hibernate.hql.ast.exec.AbstractStatementExecutor$2 doWork
VARNING: unable to drop temporary id table after use
java.sql.SQLException: Cannot drop the table '#iep.mbr_member', because it does not exist in the system catalog.
   at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
   at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
   at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
   at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
   at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
   at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
   at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:664)
   at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1120)
   at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1073)
   at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:225)
   at org.hibernate.hql.ast.exec.AbstractStatementExecutor$2.doWork(AbstractStatementExecutor.java:149)
   at org.hibernate.hql.ast.exec.AbstractStatementExecutor.dropTemporaryTableIfNecessary(AbstractStatementExecutor.java:170)
   at org.hibernate.hql.ast.exec.MultiTableUpdateExecutor.execute(MultiTableUpdateExecutor.java:170)
   at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:391)
   at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:259)
   at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1134)
   at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
   at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:43)
   at biz.ist.atlas.domain.role.jpa.JpaRoleDAO.removeReferencesFromMembers(JpaRoleDAO.java:65) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list