-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Using a Generator independently of later insertion
PostPosted: Wed May 30, 2007 4:58 am 
Newbie

Joined: Fri May 25, 2007 9:58 am
Posts: 4
Location: Dortmund / GERMANY
Hello *

I have to implement the following program logic:
Code:
    final Session session = sessionFactory.getCurrentSession();
    session.beginTransaction();

    txid = /* get new unique id from Hibernate */

    resp = sendSoapRequest(txid, ....);
    processSoapResponse(resp);

    Tx aTx = new Tx();
    aTx.setId(txid);
    ...

    session.save(aTx);
    session.getTransaction().commit();


Now, my question is: do I have to implement this get new unique id from Hibernate by myself or can I make use of the Hibernate key generators?

Thanks for help!

_________________
Klaus Kopruch
MATERNA GmbH


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.