Process Summary: Hibernate entity Mapping

Source: Internet
Author: User

This article is from: "-oa Podcast Program"

1, Write notes
The format is:? attribute, which is the expression of this object with? Of Relationship.
Example: "department attribute, many-to-one for this object and department"
2, copy Template:

3, fill in the blanks:
Name property: Property name (the 1th question mark in the note)
Class Property: The associated entity type (the 2nd question mark in the note)
Column property:
<many-to-one column= "..." Generally, you can write a property name plus an ID suffix, such as a property of department, and the column value is written as DepartmentID.
One-to-many <key column= "..." : Copy the column value from the associated opponent (the other party is a many-to-one) mapping.
Many-to-many <key column= "..." It is generally possible to write the name of this object plus the ID suffix, if this object is named user, it is written as UserID.
Many-to-many <many-to-many column= "..." Generally, it can be written as the name of the associated object plus the ID suffix.


Complete

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.