Update of /cvsroot/hibernate/HibernateExt/tools/src/templates/hbm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30826/src/templates/hbm
Modified Files:
persistentclass.hbm.ftl column.hbm.ftl
Log Message:
HBX-594 Use database table comments when generating hbm.xml
Index: persistentclass.hbm.ftl
===================================================================
RCS file: /cvsroot/hibernate/HibernateExt/tools/src/templates/hbm/persistentclass.hbm.ftl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- persistentclass.hbm.ftl 7 Feb 2006 14:02:15 -0000 1.3
+++ persistentclass.hbm.ftl 14 Feb 2006 10:11:54 -0000 1.4
@@ -57,7 +57,9 @@
<#if clazz.table.rowId?exists>
rowid="${clazz.table.rowId}"
</#if>>
-
+<#if clazz.table.comment?exists>
+ <comment>${clazz.table.comment}</comment>
+</#if>
<#-- TODO: move this to id.hbm.ftl -->
<#if clazz.hasIdentifierProperty()>
<#assign property=clazz.getIdentifierProperty()/>
Index: column.hbm.ftl
===================================================================
RCS file: /cvsroot/hibernate/HibernateExt/tools/src/templates/hbm/column.hbm.ftl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- column.hbm.ftl 6 Feb 2006 09:08:07 -0000 1.2
+++ column.hbm.ftl 14 Feb 2006 10:11:54 -0000 1.3
@@ -1,5 +1,11 @@
<#if column.isFormula()>
<formula>${column.formula}</formula>
<#else>
-<column name="${column.quotedName}" ${c2h.columnAttributes(column)}/>
+<column name="${column.quotedName}" ${c2h.columnAttributes(column)}
+<#if column.comment?exists>>
+ <comment>${column.comment}</comment>
+</column>
+<#else>
+/>
+</#if>
</#if>
\ No newline at end of file
|