• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

alternative to session.flush() in hibernate?

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am currently facing an issue with persisting an object in DB.
The scenario goes like this -

I want to update a bunch of records based on the user input.

First i save the input from the user in the DB as one row.
Then i call a procedure which selects the row based on some condition and fires an insert/update on the table.

In order to get the procedure the values, i do session.flush()..because only then will my procedure get the required row from the DB.

Is there any other way by which i can persist the object in the DB?

I did try saveOrUpdate(); but that did not work as i have parent/child relationship.


Thanks.

 
A tiny monkey bit me and I got tiny ads:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic