[ http://jira.codehaus.org/browse/XDP-82?page=comments#action_44766 ] 

Anatol Pomozov commented on XDP-82:
-----------------------------------

I found that problems could be if class name was wrong types (Jelly exception 
reporting is terrible)

Code that posted in message now located in HibernateMappingPlugin.java see 
getComponentProperties()

        if (componentClassName != null) {
            componentClass = getMetadata(componentClassName);
        } else {
            componentClass = componentPropertyClass;
        }

        return getClassProperties(componentClass);

So it is *exactly the same* code.

What version of plugin do you use?? Try to build latest version from CVS and 
let us know the result. 

BTW I added some time ago test for this case and they are passed. If you still 
have the problems it will be helpful for us if you look at this test case.

> @hibernate.component does not work where property is an interface
> -----------------------------------------------------------------
>
>          Key: XDP-82
>          URL: http://jira.codehaus.org/browse/XDP-82
>      Project: XDoclet 2 Plugins
>         Type: Bug
>   Components: hibernate
>     Versions: hibernate-1.0
>  Environment: Windows Xp, Sun JDK 5_0_4
>     Reporter: Mark Smithson
>     Assignee: 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to