Javatpoint Logo

Hibernate - One to many and bag

By: cadbur*** On: Sat Feb 25 20:47:49 IST 2017     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
First of all many thanks to the team behind this site.. wonderful job.
Was going thru the hibernate tutorial..
Not sure if am completely correct.. found 2 errors.. let me know if am correct..

1. In "One to Many mapping in Hibernate by List Example (using xml file)"

in FetchData.java, the block where we read the answers seems to be not working. it seems to work with below code

while(itr2.hasNext()){
Answer ans =(Answer) itr2.next();
System.out.println(ans.getAnswername() +" by "+ans.getPostedBy());
}


Up0Down