[ http://jira.codehaus.org/browse/XDP-65?page=comments#action_40470 ]
     
Anatol Pomozov commented on XDP-65:
-----------------------------------

Sorry for inconvenience but do you sure that you update sources from CVS??? It 
is known problem when cvs updates with delay.

See example from tests (ComponentMapping.hbm.xml)
        <component name="prefixedComponent" class="foo.bar.Baz">
            <parent name="xyz"/>
            <property name="foo" column="prfx_col" access="field"/>
            <component name="nested" access="field">
                <property name="go" access="field" column="prfx_nested_col"/>
            </component>
        </component>

I think code snippet is pretty similar to yours one. And your example also 
should work.


> Incorrect functionality when mapping @hibernate.component
> ---------------------------------------------------------
>
>          Key: XDP-65
>          URL: http://jira.codehaus.org/browse/XDP-65
>      Project: XDoclet 2 Plugins
>         Type: Bug
>   Components: hibernate
>     Versions: hibernate-1.0
>     Reporter: Michael Kantarovich
>     Assignee: Anatol Pomozov

>
>
> Hi, 
> Consider following scenario:
> Class A {
>       
>       /**
>        * @hibernate.component prefix="ClassB_"
>        */
>       B getB()
> }
> Class B {
>       /**
>        * @hibernate.component prefix="ClassC_"
>        */
>       C getC()        
>       /**
>        * @hibernate.property
>        * @hibernate.column name = "property"
>        */
>       P getAnyProperty()
> }
> Class C {
>       /**
>        * @hibernate.property
>        * @hibernate.column name = "property"
>        */
>       P getAnyProperty()      
> }
> In that case mapping file content have to be:
>     ...
>     <component name="b">
>         <component name="c">          
>       <property name="anyProperty">
>                <column name="ClassB_ClassC_anyProperty"/>
>       </property>        
>         </component>
>         
>         <property name="anyProperty">
>             <column name="ClassB_anyProperty"/>
>         </property>        
>     </component>
>     …
> But in fact it is:
>     ...
>     <component name="b">
>         <component name="c">          
>       <property name="anyProperty">
>                <column name="ClassC_anyProperty"/>
>       </property>        
>         </component>
>         
>         <property name="anyProperty">
>             <column name="anyProperty"/>
>         </property>        
>     </component>
>     …
> I think that the problem is that when inner (2-ond level) component is 
> generated, it overrides previous prefix setting, instead of concatenating.

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



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to