Understanding of xml in hibernate mapping

Pojo's mapping xml file must be written in accordance with the format, otherwise there will be problems, such as sub-attribute tags must be indented by two spaces than the parent tag.

The key in the set tag such as <set></set> must be a foreign key, and the column attribute in the relationship tag such as <many-to-one /> corresponds to the field in the pojo according to the actual situation.

Hibernate will automatically generate the table and table structure according to the configuration, no need to manually set the table, this function is very powerful, but you need to manually create the database in the database.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326426448&siteId=291194637