• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

OR mapping mutiple update statement !!!

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
I am working on ERP application .
I got 10 row into one jsp page.
Suppose I update one column value.When I want to save this I update
all 10 rows .means UPDATE SQL runs for all 10 rows
I don't want this ...I want which ever row I have update Only that
row Update will fire ...
How can I control this ...Is there any OR mapping tool in market which can
track this information ..
Any link related to this ...please post
Thanks
Gunjan Bohra
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate tracks whether a record "isDirty" and has many ways to implement this need. There are Interceptors, there are looping through the DTOs and asking if it is dirty and only calling update/save on those Objects.

Mark
 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adding a version element to your mapping file will help Hibernate keep track of dirty objects.
 
gunjan bohra
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you
I got It
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by gunjan bohra:
Hi All
I am working on ERP application .
I got 10 row into one jsp page.
Suppose I update one column value.When I want to save this I update
all 10 rows .means UPDATE SQL runs for all 10 rows
I don't want this ...I want which ever row I have update Only that
row Update will fire ...
How can I control this ...Is there any OR mapping tool in market which can
track this information ..
Any link related to this ...please post
Thanks
Gunjan Bohra



JDO is able to do that. To do that create your class with the persistent fields and the JDO metadata, like the below. Keeping track of the changes in your object is transparent to you.

class Something
{
String fieldA;
String fieldB;
}

<jdo>
<package name="something">
<class name="Something/>
</package>
</jdo>
[ November 21, 2005: Message edited by: Erik Bengtson ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic