NHibernate Tour (9): Exploring parent-child relationship (One-to-many relationship)

Source: Internet
Author: User

The contents of this section

Introduced

Type of collection in NHibernate

Establish a parent-child relationship

Parent-Child Association mappings

Conclusion

Introduced

Through the introduction of several previous articles, basically understand the nhibernate, but in the nhibernate mapping relationship is the highlight of NHibernate, but also the most difficult to master technology. From this beginning to learn these things, I will combine graphics and text to illustrate the secret knowledge here.

In the previous few, our example uses only a simple customer object. But in the customer/order/Product classic portfolio, their relationship is very complex? Let's review the data model created in the second article.

On the diagram, I have clearly labeled the relationship between the tables, first analyzing the "foreign key relationship" between customer and order, or "parent-child relationship", "One-to-many relationship". First understand the collection in NHibernate before analyzing.

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.