Hibernate ing file set key one-to-least

Source: Internet
Author: User

Configure the set key one-to-pair in the hibernate ing file. POJOs is as follows: Customer class ------> Order class of customer table corresponds to ----------> orders table customer (1) <-------------> (n) Detail {privateString id; privateString username; privateString password; privateTimestamp registerTime; privateintage; privateSet <Order> orders = newHashSet <Order> ();/* setter and getter method */} publicclassOrder {privateString id; privateString orderNumber; privateintbalance; privateCustomer custome R;/* setter and getter method */Set set ing: Hibernate provides dedicated tag elements for Set ing. Set set ing is represented by the <Set> tag: <? Xml version = "1.0" encoding = "UTF-8"?> <! DOCTYPE hibernate-mapping PUBLIC "-// Hibernate/Hibernate DTD ing DTD 3.0 // EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 

 

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.