sm94066 wrote:
These may be explained somewhere in the docs, if these are, please point me to the proper place in the docs.
javadoc api for the org.hibernate.mapping package ;)
Quote:
I want to add a custom property (member variable) in the generated xxHome (DAO) calsses which I want set to same value as the "catalog" attribute in the hbm.xml's "class" element.
sounds leaky..
Quote:
Is there a way to access the value of "catalog" property from the template (.ftl) file ? I know how to make the template generate the custom code I want, I just want to get some pointers on how to access "catalog" property.
clazz.getTable().getCatalog() should give it to you (unless the catalog is the default and then it will be null)
Quote:
2nd question is, is there a property or attribute I can set in the hbm files to tell the code generator NOT to generate "Home" (DAO) class for that table ?
no, but if the result of the template is an empty string when trimmed then no file should be generated. you can use that trick to have an if statement in the beginnig to just skip everything if a certain criteria is met.