olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bolz (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (OLINGO-1109) JPA silently dropping navigation properties if not found
Date Thu, 13 Apr 2017 18:54:41 GMT

     [ https://issues.apache.org/jira/browse/OLINGO-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Bolz reassigned OLINGO-1109:
------------------------------------

    Assignee: Michael Bolz

> JPA silently dropping navigation properties if not found
> --------------------------------------------------------
>
>                 Key: OLINGO-1109
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1109
>             Project: Olingo
>          Issue Type: Improvement
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.8
>            Reporter: Patrick Haller
>            Assignee: Michael Bolz
>
> We encountered an issue when creating a ProjectCost record, directly to be associated
with its parent Project by setting a navigation property. The information encoded in { '__metadata':
{ uri: 'xyz' } } was correctly parsed in the Olingo stack, but in
> {{JPALink.create() #174}}, the {{targetJPAEntity}} could not be resolved as the value
'xyz' was indeed wrong. The created data in persistence was missing the link to the parent
entity, but the error went unnoticed as no exception was thrown.
> I would suggest that {{JPALink.create}} should also {{throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.RESOURCE_X_NOT_FOUND}}
> like {{JPALink.delete}}. It seems that {{JPALink.modifyLink}} is also intentionally ignoring
if the target entity cannot be found.
> Not sure what behavior the OData specification documents here, but data loss should not
go unnoticed, I think.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message