The following comment has been added to this issue:

     Author: Marc T. Calello
    Created: Sun, 22 Jun 2003 8:55 PM
       Body:
I believe there is a simple way XDoclet can support multiple
hibernate components in one class.  Have an optional attribute
for @hibernate.component, say prefix, where the prefix will distinguish the 
component's columns.

Example:

/**
 * @hibernate.component class="Address" prefix="shipping"
 */
Address getShippingAddress() {
...
}
/**
 * @hibernate.component class="Address" prefix="billing"
 */
Address getBillingAddress() {
..
}
---------------------------------------------------------------------
View the issue:

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


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-351
    Summary: Unable to have many components of same class
       Type: Bug

     Status: Closed
   Priority: Minor
 Resolution: WON'T FIX

 Time Spent: Unknown
   Estimate: 0 minutes

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

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Janne Blomqvist

    Created: Tue, 4 Mar 2003 4:18 PM
    Updated: Sun, 9 Mar 2003 1:09 AM
Environment: Hibernate 1.2.3
ant 1.5.1 (debian version)


Description:
When I have a class Foo which contains more than one component of the same class Bar, 
the hbm.xml mapping doesn't work correctly because the fields of both instances of 
class Bar get mapped to the same columns. E.g. in the mapping file:

<hibernate-mapping>
<class
   name="com.foo.Foo"
   table="foo"
>

.....

     <component
          name="onecomponent"
          class="com.foo.Bar"
        >
        <property
                name="createTime"
            type="java.util.Date"
            column="createTime"
            not-null="false"
                        unique="false"
                />
      </component>
      <component
          name="anothercomponent"
          class="com.foo.Bar"
        >
 
        <property
                name="createTime"
            type="java.util.Date"
            column="createTime"
            not-null="false"
                        unique="false"
                />

      </component>
....
</class>
</hibernate-mapping>

I.e. there is only one column for createTime although two are needed. This is 
certainly a xdoclet problem because the hibernate MapGenerator tool correctly produces 
different columnnames.


---------------------------------------------------------------------
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/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: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to