[hibernate-issues] [Hibernate-JIRA] Resolved: (EJB-240) attribute-override and embedded in orm.xml not working

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Dec 1 13:14:04 EST 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-240?page=all ]
     
Emmanuel Bernard resolved EJB-240:
----------------------------------

    Resolution: Fixed

Good catch, thanks.

> attribute-override and embedded in orm.xml not working
> ------------------------------------------------------
>
>          Key: EJB-240
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-240
>      Project: Hibernate Entity Manager
>         Type: Bug

>   Components: EntityManager
>     Versions: 3.2.0.ga
>  Environment: 3.2.0GA + HA 3.2.0GA + HEM 3.2.0GA
>     Reporter: Thomas Risberg
>      Fix For: 3.2.1
>  Attachments: Hibernate-JIRA-EJB-240.zip
>
>
> Embedding an Address class twice and need to override the column names.  Using orm.xml and <embedded> plus <attribute-override> does not work while the same construct works using annotations.  The orm.xml works in the RI.
>     <embeddable class="jpatest.Address">
>         <attributes>
>             <basic name="street"/>
>             <basic name="city"/>
>             <basic name="state"/>
>             <basic name="zip"/>
>         </attributes>
>     </embeddable>
>     <entity class="jpatest.Employee" metadata-complete="false" access="FIELD">
>         <attributes>
>             <id name="id"/>
>             <basic name="name"/>
>             <embedded name="homeAddress">
>                 <attribute-override name="street">
>                     <column name="home_street"/>
>                 </attribute-override>
>                 <attribute-override name="city">
>                     <column name="home_city"/>
>                 </attribute-override>
>                 <attribute-override name="state">
>                     <column name="home_state"/>
>                 </attribute-override>
>                 <attribute-override name="zip">
>                     <column name="home_zip"/>
>                 </attribute-override>
>             </embedded>
>             <embedded name="mailAddress">
>                 <attribute-override name="street">
>                     <column name="mail_street"/>
>                 </attribute-override>
>                 <attribute-override name="city">
>                     <column name="mail_city"/>
>                 </attribute-override>
>                 <attribute-override name="state">
>                     <column name="mail_state"/>
>                 </attribute-override>
>                 <attribute-override name="zip">
>                     <column name="mail_zip"/>
>                 </attribute-override>
>             </embedded>
>         </attributes>
>     </entity>

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




More information about the hibernate-issues mailing list