in generate-entities target, add a hbmtemplate to create some 
hibernate-console.cfg.xml file. 


  |             <hbmtemplate filepattern="hibernate-console.cfg.xml"
  |                             
template="hibernatetools/hibernate-console.cfg.xml.ftl" 
  |                                  destdir="${project.home}"
  |                              />
  | 
  | 

with template

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE hibernate-configuration PUBLIC
  |         "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  |         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
  | <hibernate-configuration>
  |     <session-factory>
  |         <#foreach entity in cfg.classMappings>
  |         <mapping class="${entity.entityName}" />
  |         </#foreach>         
  |     </session-factory>
  | </hibernate-configuration>
  | 

Then you can use the generated file to define any custom values and specify 
wich properties are concerned.

As this file will be overwritten at each run of generate-entities, may be a 
better way will be to create a cfg.xml file for each entity. 

about custom value types, see 
http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#mapping-types-custom

about template: the job is done in seam-gen/view/editproperty.xhtml.ftl, 
viewproperty.xhtml.ftl and list.xhtml.ftl



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069372#4069372

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069372
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to