Question

spring + Hibernate + org.springframework.orm.hibernate3.HibernateSystemException:To delete a Record

Asked by: Srinivasu_V

while working with Hibernate & spring f/w: i'm getting the following prob:
i tried to implement the folowing qry to delete the Record:
getHibernateTemplate().find("delete from UserRefData where user_id = " + user_id );

I'm getting the following Exception:

org.springframework.orm.hibernate3.HibernateSystemException: Not supported for DML operations; nested exception is org.hibernate.HibernateException: Not supported for DML operations
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:413)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:363)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:800)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:792)

Any help on this???

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-28 at 04:32:34ID24689430
Tags

Oracle SCM

Topics

Enterprise Software

,

Spring

,

J2EE

Participating Experts
1
Points
0
Comments
53

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Hibernate, Spring and J2EE
    Whats the different between Hibernate, Spring and J2EE? And where can i obtain free ebooks from the internet regardings on three of them. Thanks.. Java New Bie Kelvin...
  2. Hibernate and Springs
    Hi All I am very new to this hibernate and spring technology. But their is a situation like I need to use these two technologies for my web applications. Very first I need to design the login form. Am using mysql database. My table name is userlogin, am using localhos...
  3. spring hibernate LocalSessionFactoryBean
    I was reading folowing lines. And I did not understand clearly. SessionFactory needs to know to which database to connect. The preferred way to do this is to wire a DataSource to the LocalSessionFactoryBean: <bean id="dataSource" class="org.springframewor...
  4. spring hibernate integration
    I was reading folowing lines. And I did not understand clearly. With the ORM tool doing most of the actual persistence, Spring provides integration points to these frameworks, as well as some additional services: Integrated transaction management Exception handling Thread-s...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: dravidnsrPosted on 2009-08-28 at 04:40:42ID: 25206510

getHibernateTemplate().update("delete from UserRefData where user_id = " + user_id );

 

by: dravidnsrPosted on 2009-08-28 at 04:41:13ID: 25206514

find replace by update

 

by: Srinivasu_VPosted on 2009-08-28 at 05:15:53ID: 25206704

Update also throwing the following Exception:

org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.String; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.String
      at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
      at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:413)
      at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:363)
      at org.springframework.orm.hibernate3.HibernateTemplate.update(HibernateTemplate.java:638)
      at org.springframework.orm.hibernate3.HibernateTemplate.update(HibernateTemplate.java:634)

 

by: Srinivasu_VPosted on 2009-08-28 at 06:28:18ID: 25207391

Actually while trying to delete a recording in Hibernate I'm getting the following Error Stack::::

org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.String; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.String
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:413)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:363)
at org.springframework.orm.hibernate3.HibernateTemplate.delete(HibernateTemplate.java:744)
at org.springframework.orm.hibernate3.HibernateTemplate.delete(HibernateTemplate.java:740)
at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:268)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:763)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:613)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:536)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.MappingException: Unknown entity: java.lang.String
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:556)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1080)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:63)
at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:575)
at org.springframework.orm.hibernate3.HibernateTemplate$25.doInHibernate(HibernateTemplate.java:750)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:358)

 

by: dravidnsrPosted on 2009-08-28 at 06:29:31ID: 25207401

u cant pass the user_id like this

"delete from UserRefData where user_id = ' " + user_id +" ' "

 

by: dravidnsrPosted on 2009-08-28 at 06:30:25ID: 25207407

in sql query
string are coming under single qutoes !!

 

by: Srinivasu_VPosted on 2009-08-28 at 06:45:20ID: 25207564

"delete from UserRefData where user_id = " + user_id
user_id is an int.  so i'm passing like this..    is there any mistake???
pls correct the query???????

 

by: dravidnsrPosted on 2009-08-28 at 06:53:19ID: 25207637

i think the table have any foregin key ? is it ??

otherwise u print the query ...

 

by: Srinivasu_VPosted on 2009-08-28 at 07:01:16ID: 25207720

Yah...    user_id is a foreign key...
Now how its possible for me to delete the row??  (foreign key row)

 

by: dravidnsrPosted on 2009-08-28 at 07:04:50ID: 25207764

so that only its say's error !!

ok u can do soft delete that means ... is there any filed called active or deactive !!

 

by: dravidnsrPosted on 2009-08-28 at 07:07:30ID: 25207789

ur hbm file have that mapping they give automatic update another table..

 

by: dravidnsrPosted on 2009-08-28 at 07:08:29ID: 25207800


do this
u print the user_id and query

 

by: Srinivasu_VPosted on 2009-08-28 at 07:10:36ID: 25207819

sorry..   no such field.
In my i'm having only3 coumns like:
ID   USER_ID   REF_DATA_ID

Just based on the USER_ID i'm deleting the REF_DATA_ID
ID is a p.key, auto generated.

 

by: Srinivasu_VPosted on 2009-08-28 at 07:13:17ID: 25207842

my query:

getHibernateTemplate().delete("delete from UserRefData where user_id = " + user_id );

if any changes pls suggest me...

 

by: dravidnsrPosted on 2009-08-28 at 07:43:32ID: 25208175

ya u can !!

 

by: dravidnsrPosted on 2009-08-28 at 07:51:36ID: 25208288

have u got the result???

 

by: Srinivasu_VPosted on 2009-08-29 at 02:29:03ID: 25213469

No I dint get the Result.......
Same prob is coming....      with delete()

 

by: dravidnsrPosted on 2009-08-29 at 02:57:38ID: 25213542

can u post ur HBM file

 

by: Srinivasu_VPosted on 2009-08-29 at 03:02:29ID: 25213562

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    <class name="com.Ex.UserRefData" table="TBL_SUBENTITLEMENT">
    <id name="id" column="ID">
        <generator class="increment"/>
    </id>
    <property name="user_id">
        <column name="USER_ID"/>
    </property>          
    <property name="ref_data_id">
        <column name="REF_DATA_ID"/>
    </property>                        
      </class>
</hibernate-mapping>

 

by: dravidnsrPosted on 2009-08-29 at 03:22:51ID: 25213623



<hibernate-mapping>
    <class name="com.Ex.UserRefData" table="TBL_SUBENTITLEMENT">
    <id name="id" column="ID" type="java.lang.Integer">
        <generator class="increment"/>
    </id>
    <property name="user_id" type="java.lang.Integer">
        <column name="USER_ID"/>
    </property>          
    <property name="ref_data_id" type="java.lang.Integer">
        <column name="REF_DATA_ID"/>
    </property>                        
      </class>
</hibernate-mapping>

just try this may be this also pblm...

 

by: dravidnsrPosted on 2009-08-29 at 03:24:00ID: 25213626

try the query which i gave to u.
getHibernateTemplate().update("delete from UserRefData where user_id = " + user_id );

 

by: Srinivasu_VPosted on 2009-08-29 at 03:44:44ID: 25213669

i've tried with the above changes also....          but same prob again:::::::

org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.String; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.String
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:413)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:363)
at org.springframework.orm.hibernate3.HibernateTemplate.update(HibernateTemplate.java:638)
at org.springframework.orm.hibernate3.HibernateTemplate.update(HibernateTemplate.java:634)

 

by: dravidnsrPosted on 2009-08-29 at 05:02:21ID: 25213788

<hibernate-mapping>
    <class name="com.Ex.UserRefData" table="TBL_SUBENTITLEMENT" select-before-update="true">
    <id name="id" column="ID" type="java.lang.Integer">
        <generator class="increment"/>
    </id>
    <property name="user_id" type="java.lang.Integer">
        <column name="USER_ID"/>
    </property>          
    <property name="ref_data_id" type="java.lang.Integer">
        <column name="REF_DATA_ID"/>
    </property>                        
      </class>
</hibernate-mapping>

jsut try this ....

 

by: dravidnsrPosted on 2009-08-29 at 05:17:34ID: 25213808

this is hibernate method  pblm only ....
thats means

try this i think it will work now !! (70% sure)

getHibernateTemplate().update("delete from UserRefData where user_id = " + user_id );
getHibernateTemplate().flush();


 

by: dravidnsrPosted on 2009-08-29 at 05:19:09ID: 25213809


method pblm only!!!

getHibernateTemplate().blukupdate("delete from UserRefData where user_id = " + user_id ); it will work gd ..
so u can try another update methods ... dont try in delete method !!


 

by: Srinivasu_VPosted on 2009-08-29 at 05:36:10ID: 25213836

I've tried with all the above changes........   changed the hbm file & added the above query..   but same prob is coming as below:

org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.String; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.String
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:413)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:363)
at org.springframework.orm.hibernate3.HibernateTemplate.delete(HibernateTemplate.java:744)
at org.springframework.orm.hibernate3.HibernateTemplate.delete(HibernateTemplate.java:740)

 

by: dravidnsrPosted on 2009-08-29 at 10:35:30ID: 25214688

srini some values are passed as string ??
print the value and check or check in debug method ??

 

by: Srinivasu_VPosted on 2009-08-29 at 23:22:02ID: 25216523

So there's no prob with foreign key....       right???

 

by: dravidnsrPosted on 2009-08-29 at 23:52:24ID: 25216569

S no pblm!!  there is nothing  u mention in ur hbm file so no pblm!!

 

by: dravidnsrPosted on 2009-08-29 at 23:54:44ID: 25216576

as per ur log ...
 ur still using delete method ... dont use delete method its for bluk delete without condition !!

use update
getHibernateTemplate().update("delete from UserRefData where user_id = " + user_id );
getHibernateTemplate().flush();


 

by: Srinivasu_VPosted on 2009-08-29 at 23:58:51ID: 25216585

U r right..   first i tried with update() only, its not working...
Thats why, i'm trying with the delete().

Any way i'll check for the String also.

 

by: dravidnsrPosted on 2009-08-30 at 00:02:55ID: 25216597

is ur filed is reffer another table ??
thats means ur filed name is another table primary key !!

 

by: Srinivasu_VPosted on 2009-08-30 at 00:08:46ID: 25216606

Yes..    the "user_id" of UserRefData table is a primary key of "User" Table.

 

by: dravidnsrPosted on 2009-08-30 at 00:18:11ID: 25216621

is there any duplicate value there??

 

by: Srinivasu_VPosted on 2009-08-30 at 00:21:22ID: 25216626

Duplicate Value???       in which Table????

 

by: dravidnsrPosted on 2009-08-30 at 00:24:32ID: 25216632

TBL_SUBENTITLEMENT table?

 

by: Srinivasu_VPosted on 2009-08-30 at 00:33:13ID: 25216655

Above table look like this:
ID is a p.key & User_ID will come multiple times, Ref_Data_Id also may come multiple times...  like below:
During registration for user_id 297, if i selected 3 check boxes, then corresponding to that 297, i'll insert their IDs in ref_data_id column...    check boxes may be 1 to n.... (For a single user_id there may be n no.of checkboxes like 2 or 5 or 10 or 20)

Ex:
ID(pk)   USER_ID   REF_DATA_ID
1            297          444
2            297          8477
3            297          47464
4            298            4
5            298          333
6            299          224
7            299          454
8            299          948
9            299          448
10          299          3433

 

by: Srinivasu_VPosted on 2009-08-30 at 00:35:20ID: 25216658

So if u compare Row wise, there'll be no duplicate values.

 

by: dravidnsrPosted on 2009-08-30 at 00:36:26ID: 25216660

can u run ur query in backend??

 

by: dravidnsrPosted on 2009-08-30 at 00:37:53ID: 25216665

org.springframework.orm.hibernate3.HibernateSystem Exception: Unknown entity: java.lang.String; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.String
org.hibernate.MappingException: Unknown entity: java.lang.String

The error appears since you are trying to save or update a String which does not have a mapping so Hibernate doesn't know how to save  or update it .

 

by: Srinivasu_VPosted on 2009-08-30 at 00:45:20ID: 25216677

I ran the query: delete from TBL_SUBENTITLEMENT where USER_ID = 414
Its working fine.....    
Actually in Hibernate Qry...  i'm passing user_id, which is a string (number only, but in string form) getting from REQUEST obj.
And i'm parsing the string form user_id to int     after that only, i'm passing int form user_id to my query..
I just printed the value also after parsing, its coming fine.....

 

by: dravidnsrPosted on 2009-08-30 at 00:51:57ID: 25216692

is it working fine now ?? ?

 

by: Srinivasu_VPosted on 2009-08-30 at 00:55:29ID: 25216699

since from the starting itself i'm passing parsed int only???
eventhough i'm getting the same above prob..  its not working

 

by: dravidnsrPosted on 2009-08-30 at 00:58:34ID: 25216710

hmm what u name mention in the parsing int and String value ??
 

 

by: Srinivasu_VPosted on 2009-08-30 at 01:05:49ID: 25216728

String searchReturnVal = request.getParameter("userId");
if(searchReturnVal!="null" && searchReturnVal!=""){
 int user_id = Integer.parseInt(searchReturnVal.trim());
 System.out.println("After Parsing user_id Value:::"+user_id);
}
By using userId key, returning a String.
And converting into int as as "user_id".....       Its printing a valid int also
That user_id only i'm passing to my delete query....
Any prob with the above code.........

 

by: dravidnsrPosted on 2009-08-30 at 01:12:17ID: 25216737

No....

 

by: Srinivasu_VPosted on 2009-08-30 at 01:15:35ID: 25216741

Thats why i'm also not getting the exact prob where is????????
Once if any updates....      i'll ping here once...

 

by: dravidnsrPosted on 2009-08-30 at 01:17:00ID: 25216750

ok all the  best....

 

by: dravidnsrPosted on 2009-08-30 at 07:35:58ID: 25217794

have u got the result !!

 

by: Srinivasu_VPosted on 2009-08-30 at 10:42:44ID: 25218469

No...    unable to trace exactly whts the prob???

 

by: dravidnsrPosted on 2009-08-31 at 06:24:00ID: 25222545

any improvement !!

 

by: Srinivasu_VPosted on 2009-08-31 at 08:07:57ID: 25223366

Yah got the sol in the following way::

SessionFactory sessionFac= getHibernateTemplate().getSessionFactory();
Session session=sessionFac.openSession();  
int updated = session.createQuery("delete from UserRefData where user_id = "+ user_id).executeUpdate();

Basically getHibernateTemplate().update, delete not supporting the query.  We need to pass the entire entity...    Thats why i was not expecting string..  but we r passing string qry only...      so I tried in the above, working fine...     Thnx a lot for ur suggestions.

 

by: dravidnsrPosted on 2009-08-31 at 08:22:42ID: 25223507

oh thats gd ...
but in hibernate 2.5
we are using getHibernatetemplate.bulkUpdate() only .....
anyway i am also learn that ..  thanx ....

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...