I have successfully used hbm2doc to generate HTML documentation for the relational database schema that we generated from our annotated entity classes. This is useful because you can specify table descriptions for each table, so you end up with Javadoc-style documentation.
However, I would like to be able to HTML in the table comment like you can in Javadoc, for when I have several paragraphs, lists, or links. For example:
Code:
@org.hibernate.annotations.Table(appliesTo = "order_component", comment = "A customer order, usually a <a href=\"http://en.wikipedia.org/wiki/Sales_order\">sales order</a>")
However, this results in a hibernate-mapping file with a
class element that contains:
Code:
<comment>A customer order, usually a <a href="http://en.wikipedia.org/wiki/Sales_order">sales order</a></comment>
which breaks the mapping file. I think it is reasonable that the text content of the
comment should be HTML-encoded. Did I miss something?
It would be nice if the hbm2doc tool would then decode HTML entities when inserting the content in the generated HTML documentation, allowing much prettier documentation.