[ 
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1549?page=comments#action_17697
 ] 

Shawn Laubach commented on XDT-1549:
------------------------------------

I made the following change and the id tag started using the $ sign like it 
should for static inner classes.

diff -u -r 
../xdoclet-cvs-orig/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-composite-id$method.xdt
 
./xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-composite-id$method.xdt
--- 
../xdoclet-cvs-orig/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-composite-id$method.xdt
     2006-10-17 12:48:02.644547600 -0500
+++ 
./xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-composite-id$method.xdt
       2006-10-17 17:24:23.317776400 -0500
@@ -59,7 +59,7 @@
        
             name="<XDtMethod:propertyName/>"
             
-            class="<XDtMethod:methodTagValue tagName="hibernate.id" 
paramName="type" default="<XDtMethod:methodType/>"/>"
+            class="<XDtMethod:methodTagValue tagName="hibernate.id" 
paramName="type" default="<XDtMethod:transformedMethodType/>"/>"
             
             <XDtMethod:ifHasMethodTag tagName="hibernate.id" 
paramName="unsaved-value">
                 unsaved-value="<XDtMethod:methodTagValue 
tagName="hibernate.id" paramName="unsaved-value" values="any,none"/>"


> Composite ID implemented as internal static class
> -------------------------------------------------
>
>          Key: XDT-1549
>          URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1549
>      Project: XDoclet
>         Type: Bug

>   Components: Hibernate Module
>     Versions: 1.3
>  Environment: XDoclet 1.3 dated by 2005-10-06, Hibernate 3.1b3
>     Reporter: Andrey Grebnev
>     Assignee: xdoclet-devel (Use for new issues)

>
>
> I have the following code:
> /**
>  * @hibernate.class table="al_core_app_resource" lazy="false"
>  */
> public class ApplicationResource extends BaseObject {
>       /**
>        * Returns ID of this resource
>        *
>        * @return ID of resource
>        * @hibernate.id generator-class="assigned" 
> class="com.blandware.atleap.model.core.ApplicationResource$ApplicationResourceID"
>        */
>       public ApplicationResourceID getId() {
>               return id;
>       }
>                      ...
>       public static class ApplicationResourceID implements CompositeID, 
> Serializable, Comparable {
>                      ...
>                      }
> }
> it generates
>         <!-- Use of @hibernate.id for composite IDs is deprecated, use 
> @hibernate.composite-id instead -->
>         <composite-id
>             name="id"
>             
> class="com.blandware.atleap.model.core.ApplicationResource.ApplicationResourceID"
>         >
> with dot for internal static class, but it should be 
>    com.blandware.atleap.model.core.ApplicationResource$ApplicationResourceID
> with $.
> As result I have the following error:
>      [java] (hbm2ddl.SchemaExport                374 ) Error creating schema
>      [java] org.hibernate.MappingException: component class not found: 
> com.blandware.atleap.model.core.Applicatio
> nResource.ApplicationResourceID
>      [java]     at 
> org.hibernate.mapping.Component.getComponentClass(Component.java:105)
>      [java]     at 
> org.hibernate.tuple.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:140)
>      [java]     at 
> org.hibernate.tuple.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:40)
>      [java]     at 
> org.hibernate.tuple.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:33)
>      [java]     at 
> org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:126)
>      [java]     at org.hibernate.mapping.Component.getType(Component.java:160)
>      [java]     at 
> org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
>      [java]     at 
> org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:574)
>      [java]     at 
> org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:685)
>      [java]     at 
> org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
>      [java]     at 
> org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:62)
>      [java]     at 
> org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:364)
>      [java] Caused by: java.lang.ClassNotFoundException: 
> com.blandware.atleap.model.core.ApplicationResource.Appl
> icationResourceID
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>      [java]     at java.security.AccessController.doPrivileged(Native Method)
>      [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>      [java]     at 
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>      [java]     at 
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>      [java]     at java.lang.Class.forName0(Native Method)
>      [java]     at java.lang.Class.forName(Class.java:141)
>      [java]     at 
> org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
>      [java]     at 
> org.hibernate.mapping.Component.getComponentClass(Component.java:102)
>      [java]     ... 11 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to