org.hibernate.MappingException: Could not determine type for: java.util.Set error when using one-way one-to-many annotation in spring 4.1

Because I annotated the id on the getter method and annotated one-to-many on the attribute, resulting in this error

Finally, I found that the location of the @ annotation: either all annotations are on the property name, or all the annotations are on the getter method! !

Guess you like

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