Hibernate - Interview Questions and Answers for 'Engineerbabu' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 3193 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Hibernate - Interview Questions and Answers for 'Engineerbabu' - 1 question(s) found - Order By Newest

Frequently asked question in companies using Hibernate.
  Q1. What is Lazy Initialization in Hibernate ?Hibernate
Admin
info@buggybread.com
Ans. It's a feature to lazily initialize dependencies , relationship and associations from the Database. Any related references marked as @OneToMany or @ManyToMany are loaded lazily i.e when they are accessed and not when the parent is loaded.

  Sample Code for Lazy Initialization

 Help us improve. Please let us know the company, where you were asked this question :   


   Like      Discuss      Correct / Improve     hibernate   lazy loading hibernate   lazy initialization hibernate   architecture     overstock.com  BridgePoint Technologies  Medgate  Dex Media  Diversant  Tieto  Oracle  Bank of America Merrill LYNCH  NEC Japan  HCL Technologies  Deloitte  Accenture  Accenture India  Infosys  Tata Consultancy (TCS)  Luxoft  Nvidia  Cority  Kumaran Systems  PubMatic  Deven Infotech  Tavant  Casenet  Azuga  Egen Solutions  Photon Infotech  Dun & Bradstreet  ITHAKA  EngineerBabu  Atos  Zycus  CPA Global  Zycus  Fareportal  Saxo Bank  NSF International   Publicis  Sapient Razorfish  Pratham Software  ATCS  Q3 Technologies  Metacube Software  A3Logics  Nagarro  Tech Mahindra  Patni Computers  L&T Infotech  Mphasis  Mindtree  Hexaware  Collabera  3i Infotech  IGate  Kpit Technologies  NIIT Technologies  Trianz  Persistent Systems  IT Asset  SkillTeam Consulting  KenQA Services  Career Infosystem  Savera IT Solutions  Miracle Corporate Solutions  MAKWIZ Technologies  Global Resources Consulting  Nastech Consulting  Best Infosystems  InnoData India  Career Trackers and Consulting  BR Raysoft Global  Brainwork TechnoSolutions  GroupFit Insurance Brokers  FlexSin Technologies  IRIS Software  FIS Global Business Solutions  TRH Consultancy Services  NexThoughts Software Technologies      Basic        frequent

Try 2 Question(s) Test


Related Questions

  What are the ways to avoid LazyInitializationException ?
  After which Hibernate version , related Entities are initialized lazily ?
 What are the points to be considered if we move from Eager initialization to Lazy Initialization in Hibernate ?
 How does Lazy Initialization helps improving performance of an application ?
 What does the following exception means

org.hibernate.LazyInitializationException: could not initialize proxy - no Session
 If you are given choice to avoid LazyInitializationException using any of the following measures, which are the ones you will choose and why ?

1. Set lazy=false in the hibernate config file.
2. Set @Basic(fetch=FetchType.EAGER) at the mapping.
3. Make sure that we are accessing the dependent objects before closing the session.
4. Force initialization using Hibernate.initialize




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: