NHibernate Tour (13): A preliminary study of immediate loading mechanism

Source: Internet
Author: User

The contents of this section

Introduced

Load now

Example analysis

1. Example of a one-to-many relationship

2. Multi-Many-to-many Relationship Example

Conclusion

Introduced

By introducing the previous article, we know that the default loading mechanism in NHibernate is deferred loading. The essence is to use GoF23 in the proxy mode implementation, this section we simply analyze nhibernate another loading mechanism-load immediately. I use a picture image of the display immediately loading mechanism.

Load now

As the name implies, loading the associated object collection immediately is the opposite of deferred loading. We can use three methods to immediately load, respectively: Optional lazy properties, NHibernate provided by the utility class, HQL crawl strategy. The following sequence is used to analyze the mechanism of the case.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.