GenWise Forums Minimize
SearchForum Home
     
  Discussions  GenWise NHibernate Templates  Adding XML attr...
 Adding XML attributes and elements
 
lakshman
18 posts
Joined
1/7/2009

Adding XML attributes and elements
Posted: 08 Jan 08 5:48 PM

I would like to automatically add the following attributes to the 'class' element to NHibernate mapping file

optimistic-lock="version"

lazy="false"

Also I would like to automatically add the following child element to the 'class' element

<version  />

Is there any way to do this during the generation time?

 

stalamoni
162 posts
5th
Joined
1/7/2009

Re: Adding XML attributes and elements
Posted: 15 Jan 08 9:55 AM
 lakshman wrote

I would like to automatically add the following attributes to the 'class' element to NHibernate mapping file

optimistic-lock="version"

lazy="false"

Also I would like to automatically add the following child element to the 'class' element

<version  />

Is there any way to do this during the generation time?

 


Yes, off course but you will need to write an extension Template for that.
If you are a non-trial user I can send you the sources of the Templates so you can take a look at decide what's better : modify the templates directly in your environment, create an extension template that adds that code to an exposed CodeBlock, etc.



Sebastian Talamoni
GenWise Team
www.genwise.com
  Discussions  GenWise NHibernate Templates  Adding XML attr...
Forum Home  Search     
 
 
Copyright 2002-2005 Genwise B.V   |  GenWise   |  Privacy Statement   |  Terms Of Use