[jboss-user] [JBoss Eclipse IDE (users)] - custom templates
kthackray
do-not-reply at jboss.com
Tue Sep 12 11:42:20 EDT 2006
Dear all,
I would like to generate, based on 1 set of hmb.xml files, 2 kind of classes: the domain pojos for the server side and their equivalent for the client side.
My hbm.xml files contains the definition for the server side. I have then 2 sets of custom templates, with 2 hbm2java task (1 for server side/1 for client side)
<hibernate-mapping package="be.xxx.server.domain.model">
| <class table="table" name="Table">
| ...
In my Pojo.ftl (for the client side), as my client/server domain code package naming is quite similar, I use this trick to customize the package declaration:
${pojo.getPackageDeclaration()?replace("server", "client")}
For the client side, everything is going fine, except that the generated code does not go into the correct package; generated classes still end up in the server side packages, even with my custom Pojo.ftl
Am I clear? Is it possible?
Thanks in advance,
Kevin.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971047#3971047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971047
More information about the jboss-user
mailing list