>> 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/