Forum: One-to-many correlation mapping/unidirectional correlation/Two classes, can have two (multiple) association relationship/content for large text type/

Source: Internet
Author: User

>> One-way: Write only one end of the mapping attribute, the other end is not written (one end is not necessary); bidirectional: Write mapped properties on both sides

There are two types of >> one-to association: a class of primary key-based ( generally not used ), a class of foreign key-based (key learning);

Foreign key: is a normal field, and the value of the field is the primary key of the other table. For example, a field in a table is the primary key of table B, so he can be a foreign key to table A.

Foreign keys can be repeated, and can be null values. The only non-null difference from the primary key;

One-to-one: on the other side, add <many to one name= "" colum= "" class= "" unique= "true"/> "on the foreign key

Forum: One-to-many correlation mapping/unidirectional correlation/Two classes, can have two (multiple) association relationship/content for large text type/

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.