Hi Boson, actually I tried it, got some errors, finally got the output but not efficient way of using hibernate. Actually I posted it in this forum, due to the lengthy post no one was replying, so I posted this thread.
Anyhow just now one of my friend gave me an idea, I am working on it now. I will post it when I am done with it.
@Hemant: What about the Example2.java program? Is it the right approach, getting an entire record from database and inserting a new record based on it?
Joined: Dec 23, 2008
based on the way you have retreived the object, it seems to me that there is only one Author with name "Herbert Schildt"
Query query=session.createQuery("select id from Author where name='Herbert Schildt'");
if so is the case, i would recommend this approach for author retrival,