The doclet tags map to hibernate mapping tags and attributes. If you understand how you can hand create a mapping hbm xml file then the doclet is much easier to understand. Having said that:
Quote:
- With hibernate.set you specify that a set is used to manage a collection of items.
- With hibernate.collection-key... ???
- With hibernate.collection-one-to-many you specify the class that is saved within the collection (Items are saved in the collection in class User, because a User can have many Items: one-to-many)
@hibernate.set - is the collection container to be used. In this case a HashSet. This matches the Java return type of the method that returns the collection.
@hibernate.collection-key - is the foreign key column in the child table.
@hibernate.collection-one-to-many class - It the domain object representing each individual record of the collection. Hibernate knows which table its referencing when it refers to the Item mapping document.
See the hibernate reference manual for the HBM xml markup.