-->
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.  [ 4 posts ] 
Author Message
 Post subject: Error while deleting a record
PostPosted: Tue Feb 10, 2009 1:37 am 
Newbie

Joined: Mon May 26, 2008 6:09 am
Posts: 8
Hi,

I am new to hibernate and just want to delete one record simply from database.

I wrote Native Sql Query and run it. While executing it is giving the error something like

estimated cost of this query is [xxx]


Can you please suggest me something


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 1:39 am 
Regular
Regular

Joined: Thu Sep 06, 2007 2:22 am
Posts: 108
Location: Noida,India
Could you please post the query, code and error log message.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 2:01 am 
Newbie

Joined: Mon May 26, 2008 6:09 am
Posts: 8
Code:
String sql = "delete from "+ tableName +"  where "+ column +" = "+id;
                Query query = sess.createSQLQuery(sql);
                int row = query.executeUpdate();


error is:

The query has been canceled because the estimated cost of this query (2052) exceeds the configured threshold of 300. Contact the system administrator.
[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 3:11 am 
Regular
Regular

Joined: Thu Sep 06, 2007 2:22 am
Posts: 108
Location: Noida,India
This is problem of DBMS s/w (like Oracle, SQL ). Please contact your DBA with exact query.


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

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.