Announcement Announcement Module
No announcement yet.
Hibernate reattaching useless in web tier Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hibernate reattaching useless in web tier


    Im using Hibernate and lots of times Ive read that Hibernate's feature to reattach object is cool, because object can be for eg. updated to db after it has returned from UI layer where it has been changed as detached.

    It sounds cool, but web is stateless, and when I load data object from db to present fields as form fileds, I cannot pass it down to data tier for update when Submit is pressed. All I see in web request controller after submit is ID of this db row, thus I have to load it again, and update then, right? If web would be statefull (avoiding HttpSession for numerous reasons of course), then instance would be kept in UI layer, and reattached during some update/delete actions.

    Or am I wrong?