Announcement Announcement Module
Collapse
No announcement yet.
[Newbie] If I want the added row ID and removed row ID Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Newbie] If I want the added row ID and removed row ID

    I wonder how I can get the ID back after database manipulation by using HibernateTemplate.

    I'm keep walking through the API but can't find the way.

    Every helps will be thankful
    Max

  • #2
    Code:
    String key = (String)getHibernateTemplate().save(entity);
    as for the removed row id..
    i don't know..

    Comment


    • #3
      You are passing the entity to the delete method, so you know in advance the id. When using the save method you get the id returned, it's only actually a Serializable, not necessarily a String.

      Jörg

      Comment


      • #4
        Originally posted by Jörg Heinicke View Post
        You are passing the entity to the delete method, so you know in advance the id. When using the save method you get the id returned, it's only actually a Serializable, not necessarily a String.
        Indeed, is there any chance you can explain more about what you are trying to do?
        Last edited by karldmoore; Aug 27th, 2007, 05:31 PM.

        Comment

        Working...
        X