Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@XmlInverseReference annotation generation duplication #439

Open
slavb18 opened this issue Nov 27, 2020 · 0 comments
Open

@XmlInverseReference annotation generation duplication #439

slavb18 opened this issue Nov 27, 2020 · 0 comments

Comments

@slavb18
Copy link
Contributor

slavb18 commented Nov 27, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant