@hibernate.component does not work where property is an interface
-----------------------------------------------------------------

         Key: XDP-90
         URL: http://jira.codehaus.org/browse/XDP-90
     Project: XDoclet 2 Plugins
        Type: Bug
  Components: hibernate  
    Versions: hibernate-1.0    
 Environment: Windows Xp, Sun JDK 5_0_4
 Reporter: maulin shah
 Assigned to: Anatol Pomozov 
    Priority: Minor


With the following classes

public interface Interface {}

/**
 * @hibernate.class
 */
public class Parent {
        private Interface component;

        /**
         * @hibernate.component class="Component"
         */
        public Interface getComponent() {
                return this.component;
        }

        public void setComponent(Interface component2) {
                this.component = component2;
        }
}

public class Component implements Interface {
        private int property;

        /** 
         * @hibernate.property
         */
        public int getProperty() {
                return this.property;
        }

        public void setProperty(int property) {
                this.property = property;
        }
}

you get this mapping generated:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>

<hibernate-mapping>
  <class name="Parent">
    <component name="component" class="Component"/>
  </class>
</hibernate-mapping>

but it should be :

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>

<hibernate-mapping>
  <class name="Parent">
    <component name="component" class="Component">
      <property name="property"/>
    </component>
  </class>
</hibernate-mapping>

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



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to