Results 1 to 3 of 3

Thread: lazy loading

  1. #1
    sid123 is offline Member
    Join Date
    Apr 2013
    Posts
    5
    Rep Power
    0

    Default lazy loading

    can any body help me to know what is the difference between lazy and fetch? with example


    thanks

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,033
    Rep Power
    6

    Default Re: lazy loading

    Not certain about fetch other than its normal definition. But the term "lazy loading" that I am familiar with means to load something (like an image) when it is needed as to pre-loading the image.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    jbarke12's Avatar
    jbarke12 is offline Member
    Join Date
    May 2013
    Location
    Charleston, South Carolina USA
    Posts
    88
    Rep Power
    0

    Default Re: lazy loading

    Lazy loading in hibernate has to do with the way the database is accessed. Lets say you have a parent class with multiple object in it. Lazy loading doesn't pull the information from the database until you try to access the object within that parent class. Fetching is actually getting the data from the database. Lazy loading is a type of fetch in hibernate.

Similar Threads

  1. lazy loading of subclass in hibernate
    By ganesh.guddu in forum JDBC
    Replies: 10
    Last Post: 12-12-2009, 04:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •