The following issue has been updated:

    Updater: Karsten Blees (mailto:[EMAIL PROTECTED])
       Date: Sun, 4 Jan 2004 12:50 AM
    Comment:
The attached patch should resolve the issue. Patch is against xdoclet-1.2 
modules/hibernate/src directory (patch -p0 < patch.diff).

* Enables parsing of inner classes. Don't know to what extent this will affect 
performance due to sufficiently large project base.
* Outputs one .hbm.xml file per mapped (inner) class in the form 
package/Outer$Inner.hbm.xml (as would be expected by 
net.sf.hibernate.cfg.Configuration.addClass(), so it works with factoryclass task).
* Adds a special tag handler XDtHibernate:fullClassName (as a replacement for 
XDtClass:fullClassName) that is capable of resolving partially qualified class names 
(i.e. with class or package scope) and rewrite them to the form used in Hibernate / 
java.lang.Class.forName()/getName() (i.e. inner classes are separated with '$').
* Adds a special tag handler XDtHibernate:methodTagOrType (as a replacement for 
XDtMethod:methodTagValue and XDtMethod:methodType wherever the returned string denotes 
a type/class). See JavaDocs and .xdt templates for examples.

I've tried to replace all occurences of fullClassName / methodTagValue in the 
templates with the new tags where inner classes may apply, though I'm lacking mappings 
to test this in all circumstances. However, the new tags should behave exactly as the 
originals when dealing with outer classes and primitives. Basic inner class mappings, 
many-to-one, one-to-many and composite-element associations work ok.

    Changes:
             Attachment changed to patch.diff
    ---------------------------------------------------------------------
For a full history of the issue, see:

  
http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-639&page=history

---------------------------------------------------------------------
View the issue:

  http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-639


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-639
    Summary: Error in property element when type is a static inner class
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             Hibernate Module
   Versions:
             1.2 Beta 3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Ross Johnson

    Created: Sat, 20 Sep 2003 11:41 AM
    Updated: Sun, 4 Jan 2004 12:50 AM
Environment: Windows XP, J2SDK 1.4.2, Hibernate 2.0.3, Xdoclet 1.2b3

Description:
I have a persistent class which contains a public static inner class. When Xdoclet 
generates the hbm.xml file, the property.type attribute is writen using normal Java 
notation: package.Class.InnerClass. The problem  is that Hibernate requires that inner 
classes be named: package.Class$InnerClass in the mapping file.

Here is an example of the generated mapping file...

<property
    name="inner"
    type="test.Outer.Inner"
    update="true"
    insert="true"
    column="inner"
    />

>From the hibernate docs...

You may persist any static inner class. You should specify the class name using the 
standard form ie. eg.Foo$Bar.



---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to