You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Tilo Eilebrecht (JIRA)" <ji...@apache.org> on 2017/08/02 15:05:01 UTC

[jira] [Created] (OLINGO-1156) ODataJPAServiceFactory - Cannot create or update entry with ManyToOne association

Tilo Eilebrecht created OLINGO-1156:
---------------------------------------

             Summary: ODataJPAServiceFactory - Cannot create or update entry with ManyToOne association
                 Key: OLINGO-1156
                 URL: https://issues.apache.org/jira/browse/OLINGO-1156
             Project: Olingo
          Issue Type: Bug
          Components: odata2-jpa
    Affects Versions: V2 2.0.9
            Reporter: Tilo Eilebrecht
         Attachments: Alternative.java, Scope.java

My project uses ODataJPAServiceFactory. I have an entity (Scope) which references another entity (Alternative) with a ManyToOne relationship. The JoinColumn is idAlternative. If I submit a create or change request, the reference (idAlternative) is not created or updated. As the reference is mandatory, object creation fails altogether.

I have investigated into possible causes and I stumbled on org.apache.olingo.odata2.jpa.processor.core.access.dataJPAEntity, method write. This method identifies idAlternative as an embeddable key and removes it from the propertyNames set. Therefore it does not get written into the object.






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)