-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bulk delete - could not insert/select ids for
PostPosted: Fri Oct 12, 2007 7:00 pm 
Newbie

Joined: Thu Mar 22, 2007 3:27 pm
Posts: 3
I tried the following code to run a bulk update - I changed the query from a complicated one to this simplest one though makes no sense by itself. However, I got the exception below. I am using Sybase ASE 12 and Hibernate 3. I highlighted the SQL it tried to execute and really don't understand why it did insertion.

I am really confused. Please advise! Thanks!!

[Code] ==================
session = getSession();
Query query = session.createQuery("DELETE PartyRelationship p WHERE p.id = :id");
query.setLong("id", id);
query.executeUpdate();

[Exception In Console] ===========
[b]Hibernate: insert into #tbl_party_relationship select bulk_target.party_relationship_id as party_relationship_id from dbo.tbl_party_relationship bulk_target where party_relationship_id=?
[/b]
Oct 12, 2007 4:26:41 PM org.apache.commons.logging.impl.Jdk14Logger warn
WARNING: unable to drop temporary id table after use
java.sql.SQLException: Cannot drop the table '#tbl_party_relationship', because it doesn't exist in the system catalogs.
...

[Exception in JUNIT} =============
org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.SQLGrammarException: could not insert/select ids for bulk delete
Caused by: org.hibernate.exception.SQLGrammarException: could not insert/select ids for bulk delete
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
...
Caused by: java.sql.SQLException: #tbl_party_relationship not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).
...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.