Skip to content

@XmlInverseReference annotation generation duplication #439

@slavb18

Description

@slavb18
Overview of the issue

Sequential generation of model with @XmlInverseReference element generates
additional @XmlInverseReference annotation

Expected Outcome
@XmlInverseReference(mappedBy = "docfiles")
Current Outcome
@XmlInverseReference(mappedBy = "docfiles")
@XmlInverseReference(mappedBy = "docfiles")

two or more, by generation count

Steps to Reproduce(Only for bug reports)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entity-mappings ptype="MONOLITH" ppkg="ru.ilb.jparestresource" epkg="model" v="3.1" rws="_14881688460591" Pws="_14881688460591" cws="_14881688460591" persistenceUnitName="jparestresource" sm="false" xs="true" id="_14855761330684" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <description>jparestresource model</description>
    <entity compositePrimaryKeyClass="DocfilePK" abs="false" class="Docfile" v="true" jbn="false" xre="true" m="false" rootElement="_14855761330684" id="_14855761330685">
        <annotation e="true" n="@ru.ilb.common.jpa.history.AutoHistory"/>
        <attributes>
            <basic optional="true" attribute-type="String" v="true" xvt="" name="comment" id="_14855761330778">
                <des>File comment</des>
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
            </basic>
            <basic optional="true" attribute-type="Boolean" v="true" xvt="" name="confirm" id="_14855761330779">
                <des>Confirmation status</des>
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
            </basic>
            <basic optional="true" attribute-type="String" v="true" xvt="" name="userName" id="_148557613307711">
                <des>User created</des>
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
            </basic>
            <many-to-one optional="true" primaryKey="false" connected-entity-id="_14855761330696" connected-attribute-id="_1527073199140125" v="true" xvt="I_E" name="document" id="_1527073199132124">
                <xwm/>
                <xm/>
            </many-to-one>
            <id attribute-type="Long" v="true" xvt="" name="id" id="_14855761330767">
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
                <column unique="false" nullable="false" insertable="true" updatable="true" length="255" precision="0" scale="0"/>
                <generated-value strategy="AUTO"/>
            </id>
        </attributes>
    </entity>
    <entity lbl-ref="_148557613307718" compositePrimaryKeyClass="DocumentPK" abs="false" class="Document" v="true" jbn="false" xre="true" m="false" rootElement="_14855761330684" id="_14855761330696">
        <annotation e="true" n="@ru.ilb.common.jpa.history.AutoHistory"/>
        <attributes>
            <basic optional="true" attribute-type="String" v="true" xvt="E" name="displayName" id="_148557613307718">
                <des>Document name</des>
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
                <bv>
                    <si mi="1" ma="255" m="must be beweeen 1 and 255 chars"/>
                </bv>
            </basic>
            <basic optional="true" attribute-type="String" v="true" xvt="" name="description" id="_148557613307716">
                <des>Document description</des>
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
            </basic>
            <basic optional="true" attribute-type="java.time.LocalDate" v="true" xvt="" name="docDate" id="_148557613307719">
                <des>Document date</des>
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
            </basic>
            <one-to-many orp="true" collection-type="java.util.List" cit="java.util.ArrayList" connected-entity-id="_14855761330685" connected-attribute-id="_1527073199132124" v="true" xvt="E_R" name="docfiles" id="_1527073199140125">
                <xwm/>
                <xm/>
                <an e="true" n="@org.eclipse.persistence.annotations.CascadeOnDelete"/>
                <cascade>
                    <cascade-all/>
                </cascade>
            </one-to-many>
            <one-to-one own="true" orp="true" optional="true" primaryKey="false" connected-entity-id="_14855761330696" v="true" xvt="" name="document" id="_1535367981111300">
                <xwm/>
                <xm/>
                <an e="true" n="@org.eclipse.persistence.annotations.CascadeOnDelete"/>
                <cascade>
                    <cascade-all/>
                </cascade>
            </one-to-one>
            <id attribute-type="Long" v="true" xvt="" name="id" id="_148557613307715">
                <xwm nil="false" req="false"/>
                <xm nil="false" req="false"/>
                <column unique="false" nullable="false" insertable="true" updatable="true" length="255" precision="0" scale="0"/>
                <generated-value strategy="AUTO"/>
            </id>
        </attributes>
        <table>
            <index n="" u="false">
                <c c="DOCDATE"/>
            </index>
        </table>
    </entity>
    <snp loc="BEFORE_PACKAGE" e="true">/**
        * This file was generated by the JPA Modeler
        */</snp>
    <inf e="true" n="java.io.Serializable"/>
    <c>
        <ct>java.util.List</ct>
        <ct>java.util.Set</ct>
        <ct>java.util.Map</ct>
        <ct>java.util.Collection</ct>
        <cit>java.util.ArrayList</cit>
        <cit>java.util.LinkedList</cit>
        <cit>java.util.HashSet</cit>
        <cit>java.util.TreeSet</cit>
        <cit>java.util.HashMap</cit>
    </c>
    <wsl>
        <ws n="Main" id="_14881688460591">
            <i ref="_14855761330685" x="419" y="190"/>
            <i ref="_14855761330696" x="144" y="73"/>
        </ws>
    </wsl>
</entity-mappings>
Jeddict Version(s)

Version: 5.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions