Update of /cvsroot/hibernate/HibernateExt/tools/src/templates/hbm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24110/src/templates/hbm
Modified Files:
persistentclass.hbm.ftl hibernate-mapping.hbm.ftl
Log Message:
hbm2hbmxml simplified
Index: persistentclass.hbm.ftl
===================================================================
RCS file: /cvsroot/hibernate/HibernateExt/tools/src/templates/hbm/persistentclass.hbm.ftl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- persistentclass.hbm.ftl 6 Feb 2006 09:08:07 -0000 1.2
+++ persistentclass.hbm.ftl 7 Feb 2006 14:02:15 -0000 1.3
@@ -57,3 +57,18 @@
<#if clazz.table.rowId?exists>
rowid="${clazz.table.rowId}"
</#if>>
+
+<#-- TODO: move this to id.hbm.ftl -->
+<#if clazz.hasIdentifierProperty()>
+<#assign property=clazz.getIdentifierProperty()/>
+<#include "id.hbm.ftl"/>
+<#elseif clazz.hasEmbeddedIdentifier()>
+<#assign embeddedid=clazz.key/>
+<#include "id.hbm.ftl"/>
+</#if>
+
+<#foreach property in clazz.getUnjoinedPropertyIterator()>
+<#include "${c2h.getTag(property)}.hbm.ftl"/>
+</#foreach>
+
+</${c2h.getTag(clazz)}>
\ No newline at end of file
Index: hibernate-mapping.hbm.ftl
===================================================================
RCS file: /cvsroot/hibernate/HibernateExt/tools/src/templates/hbm/hibernate-mapping.hbm.ftl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hibernate-mapping.hbm.ftl 6 Feb 2006 09:08:07 -0000 1.2
+++ hibernate-mapping.hbm.ftl 7 Feb 2006 14:02:15 -0000 1.3
@@ -30,3 +30,7 @@
<#else>
<hibernate-mapping>
</#if>
+
+<#include "persistentclass.hbm.ftl"/>
+
+</hibernate-mapping>
\ No newline at end of file
|