Use database table comments to generate default class-descriptor in .hbm mapping file and description in java source file

Description

The idea is, when doing reverse engineering (jdbc db to hbm), to
1) include the database table/column comment as class-description property in the hibernate mapping file
2) include the comment as class description in the javasource file.

PS this jdbc setting must be on !
hibernate.connection.remarksReporting=true

Environment

oracle 10g, hibernate 3.1, tools M4

Activity

Show:

Max Rydahl Andersen September 15, 2006 at 2:27 PM

decided not to fix since trivial to implement in the templates.

NicolásN April 26, 2006 at 9:48 PM

Just putting it in the simple cases (which are the vast majority) would be a great improvement!

For the multi-column case I think you could just copy all the information (all the comments), and let the user decide/edit/merge the comment afterwards.

Max Rydahl Andersen February 14, 2006 at 12:13 PM

i've implemented that hbm.xml now puts <comment> under <class> when a table has a comment, and each column now also has a <comment> if the column has a comment.

not done anything for the java files yet.

i also now remembered why i did not do it before...the mapping model is ambigous regarding the comment. You can not see from which property a comment comes...and what if there are multiple columns...which comment should be used ?

Won't Fix

Details

Assignee

Reporter

Participants

Max Rydahl Andersen
NicolásN
tony nys

Components

Affects versions

Priority

Created February 14, 2006 at 11:22 AM
Updated September 15, 2006 at 2:27 PM
Resolved September 15, 2006 at 2:27 PM