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

maulin shah commented on XDP-82:
--------------------------------

I think this was a misunderstanding when the issue was closed. I think what 
solves this is if we modify Component.jelly to to use the declared "class" 
value if it is present to find the component mappings, and if it is not 
declared, then to look for it. Anatol commented on this same issue on July 4th 
at http://www.mail-archive.com/[email protected]/msg00122.html.

Incidentally, just pasting in the code that is on that posting into 
component.jelly in my existing jar has solved the problem...

thanks.


> @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