-->
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: No persister for: net.sf.hibernate.impl.QueryImpl
PostPosted: Mon Feb 02, 2004 10:32 am 
Regular
Regular

Joined: Mon Jan 19, 2004 10:39 pm
Posts: 84
Location: Nottingham, England
Hi,
I am trying to run a query which returns a record based on the user_id(column name) of the table being equal to a value. I am saying:

public void deleteUserdetails (int user_id)
{

String userID = String.valueOf(user_id);

try {
...........
Transaction transaction = session.beginTransaction();

Query query = session.createQuery("from User usr where usr.id = :userID");
query.setString("userID",userID);
session.delete(query);

transaction.commit();

Util.closeSession();

}

}


13:49:19,858 DEBUG SessionImpl:528 - opened session
13:49:19,865 DEBUG JDBCTransaction:37 - begin
13:49:19,872 DEBUG JDBCTransaction:41 - current autocommit status:false
13:49:19,908 DEBUG SessionImpl:1072 - deleting a transient instance


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2004 10:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Thats Crap. Use session.delete("from User usr where usr.id = ?", id, Hibernate.STRING); And please read the manual.


Top
 Profile  
 
 Post subject: gloeglm
PostPosted: Mon Feb 02, 2004 10:41 am 
Regular
Regular

Joined: Mon Jan 19, 2004 10:39 pm
Posts: 84
Location: Nottingham, England
I read that from Hibernate post...... Thanks for your help though.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 02, 2004 10:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Which post? Thats obviously wrong, it should be noted in the post.


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.