On Mon, 2003-10-13 at 18:28, Bear Giles wrote:
> I'm sure this is someplace obvious but it's totally escaped me...
> which means I'll probably find it right after hitting return.
> 
> Summary: what is the name of the file merged with the <template>
> action under <hibernatedoclet>?  I know it's 
> "hibernate-properties-{0}.xml" for the <hibernate> action, but I 
> can't find the name of the file (or better yet, how to specify it) 
> for the <template> action.
> 
> Background:  I have a bunch of classes with @hibernate tags, and 
> have no problems generating *.hbm.xml files.
> 
> I've added two template targets that automatically generate a 
> minimal DAO interface and a DAOHibernate binding.  Again, no 
> problem.  (If you're looking at doing this yourself, the trick is 
> to do most of the work in a base class and cache the Hibernate 
> queries in a resource bundle for the 
> <XDtClass:className/>DAOHibernate class.
> 
> The problem I've hit is that I want to be able to use the merge 
> feature to support additional DAO interfaces and methods - the 
> autogenerated code is limited to the functionality common to all 
> objects.  (Essentially the minimal CRUD set, plus a "load 
> everything" method.)  I have "mergeDir" attribute set, but I have 
> no idea what the name of the file being merged is, or if it's 
> (shudder) always going to be hibernate-properties-{0}.xml!

Any per-class merge files (i.e. with the {0} in the filename) will
probably be using the class name (possibly the bean name with EJBs, I
don't have the code handy at the moment to check).  The biggest catch,
however, is that you have to put them in the same package/directory
hierarchy *below* the specified mergedir as the original classes.  So if
the class was foo.bar.SomeClass, the merge file should be
${mergedir}/foo/bar/hibernate-properties-SomeClass.xml
This is so that the merge files don't clash if you have classes of the
same name in different packages...


Andrew.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to