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

Thomas Risberg (JIRA) noreply at atlassian.com
Tue Oct 17 17:56:24 EDT 2006


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


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