On Tuesday, May 27, 2003, at 03:40 PM, Tim Colson wrote:
Other docs advise to never touch the hbm file by human hands - let
xdoclet do it.

I'm in this camp. Although there can be a couple of happy mediums here with XDoclet:


- merge points - I don't know how Hibernate templates use them (or if they do at all), but its possible to have static stuff placed into the generated artifact that doesn't exist in the @tags or other implicit metadata.

- Ant property substitution - you can use ${prop.name} syntax in XDoclet @tag attribute values and they will be automatically expanded during generation. This can really help when you have different "profiles" (clients, sites, whatever term you want to use) that might need different information folded in.

The generated artifacts from XDoclet should not, in the Hibernate case, be tweaked after the fact and should be *active* generation (see the Pragmatic Programmer book for a great discussion of passive versus active generation). If there are areas where you are having to tweak things because the XDoclet/Hibernate combination is not sufficient, then its surely an issue that should be brought up on the xdoclet-user/-devel lists.

As I write this, I am realizing that xdoclet isn't really the same as
autogenerated since the xdoclet uses my hand-written comments in the src
and is mostly 'transcribing' them to xml.

It does a bit more than that - it uses all the implicit metadata (classnames, package structure, method names, method parameters/types) as well, as well as Ant property substitution and merge files.


Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to