Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1383

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-1383
    Summary: HibernateTagsHandler mistakenly treats Hibernate string type ids 
as composites
       Type: Bug

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             Hibernate Module
   Versions:
             1.2.3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Adrian Bigland

    Created: Wed, 4 May 2005 10:32 AM
    Updated: Wed, 4 May 2005 10:32 AM
Environment: Windows XP

Description:
I've seen this issue reported twice for 1.2.2 and closed.

I'm getting the same problem in 1.2.3.

I get a NullPointerException on line 169 of HibernateTagsHandler, which is in 
the void hasCompositeId_Impl(String template, boolean composite) method from 
the following @hibernate.id tag:

    /**
     * @hibernate.id
     *  name="reference"
     *  type="string"
     *  column="INVENTORY_ITEM_REFERENCE"
     *  unsaved-value="0"
     *  generator-class="assigned"
     * @hibernate.column
     *  name="INVENTORY_ITEM_REFERENCE"
     *  sql-type="VARCHAR2(20)"
     *  not-null="true"
     */
    public String getReference() {
        return this.reference;
    }

The problem is fixed by changing the type to "java.lang.String". This shouldn't 
be hitting the composite id code at all...

Looking at the posts reporting this problem for 1.2.2 the assigned developer 
says that string is not a java type. Perhaps this is a misunderstanding in the 
requirements. The type should actually be a Hibernate type - this includes java 
FQNs, but also a set of logical names for types used in Hibernate mapping files 
- string is one of these. See p 198 s 6.1.1 of Hibernate in Action and 
http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html#mapping-types
 s 5.2.2 of Hibernate's on-line docs.


---------------------------------------------------------------------
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: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to