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

2017-10-02 Thread Tilo Eilebrecht (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16187885#comment-16187885
 ] 

Tilo Eilebrecht commented on OLINGO-1156:
-

Please remove two curly brackets from the beginning and end of each request. 
They were meant for formatting but did not work as expected.

> 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
> Environment: EclipseLink 2.5.2
>Reporter: Tilo Eilebrecht
>Assignee: Michael Bolz
>Priority: Blocker
> Attachments: Alternative.java, Scope.java
>
>
> My project uses ODataJPAServiceFactory as described in the tutorial for JPA. 
> I have an entity which references another entity with a ManyToOne 
> relationship. If I submit a create or change request, the reference 
> (idAlternative) is not created or updated. As the field is not nullable, 
> object creation fails altogether.
> See my Entities in the attachment. The JoinColumn is idAlternative. 
> 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)


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

2017-10-02 Thread Tilo Eilebrecht (JIRA)

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

Tilo Eilebrecht closed OLINGO-1156.
---
Resolution: Not A Bug

> 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
> Environment: EclipseLink 2.5.2
>Reporter: Tilo Eilebrecht
>Assignee: Michael Bolz
>Priority: Blocker
> Attachments: Alternative.java, Scope.java
>
>
> My project uses ODataJPAServiceFactory as described in the tutorial for JPA. 
> I have an entity which references another entity with a ManyToOne 
> relationship. If I submit a create or change request, the reference 
> (idAlternative) is not created or updated. As the field is not nullable, 
> object creation fails altogether.
> See my Entities in the attachment. The JoinColumn is idAlternative. 
> 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)


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

2017-10-02 Thread Tilo Eilebrecht (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16187881#comment-16187881
 ] 

Tilo Eilebrecht commented on OLINGO-1156:
-

Hi Michael,

thanks for the reply. In the meantime we have switched to not using Navigation 
Properties. Instead we simply publish the ID of the referenced entity as an 
integer. This means the front-end (SAPUI5) has to know a little more about 
relationships. We found this is easier. We also decided to switch to your Janos 
project as it is more flexible.

There was a misunderstanding of the OData NavigationProperty handling from my 
side. So there is no bug - I will close the ticket.

For any other users who try to achieve this: I had tried to create an entity 
(Scope) with a reference to another entity (Alternative) that already exists. I 
tried to directly send the ID of the referenced entity:
{{\{ , "IdAlternative" : 5\}}}

I now learned that the correct syntax for this is

{{\{ , "AlternativeDetails" : \{ "__metadata": \{"uri": ""\}\}\}}}

It is important to use the navigation property name "AlternativeDetails" 
generated by Olingo instead of the field "IdAlternative".

Sorry for the inconvenience. 

Regards, Tilo

> 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
> Environment: EclipseLink 2.5.2
>Reporter: Tilo Eilebrecht
>Assignee: Michael Bolz
>Priority: Blocker
> Attachments: Alternative.java, Scope.java
>
>
> My project uses ODataJPAServiceFactory as described in the tutorial for JPA. 
> I have an entity which references another entity with a ManyToOne 
> relationship. If I submit a create or change request, the reference 
> (idAlternative) is not created or updated. As the field is not nullable, 
> object creation fails altogether.
> See my Entities in the attachment. The JoinColumn is idAlternative. 
> 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)


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

2017-08-17 Thread Tilo Eilebrecht (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16130187#comment-16130187
 ] 

Tilo Eilebrecht commented on OLINGO-1156:
-

Increasing Priority to Blocker as this stops our development. In my eyes this 
is a major point - it makes it impossible to work with objects that have 
navigation properties (at least when theys need to be updated).

> 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
> Environment: EclipseLink 2.5.2
>Reporter: Tilo Eilebrecht
>Priority: Blocker
> Attachments: Alternative.java, Scope.java
>
>
> My project uses ODataJPAServiceFactory as described in the tutorial for JPA. 
> I have an entity which references another entity with a ManyToOne 
> relationship. If I submit a create or change request, the reference 
> (idAlternative) is not created or updated. As the field is not nullable, 
> object creation fails altogether.
> See my Entities in the attachment. The JoinColumn is idAlternative. 
> 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)


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

2017-08-17 Thread Tilo Eilebrecht (JIRA)

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

Tilo Eilebrecht updated OLINGO-1156:

Priority: Blocker  (was: Major)

> 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
> Environment: EclipseLink 2.5.2
>Reporter: Tilo Eilebrecht
>Priority: Blocker
> Attachments: Alternative.java, Scope.java
>
>
> My project uses ODataJPAServiceFactory as described in the tutorial for JPA. 
> I have an entity which references another entity with a ManyToOne 
> relationship. If I submit a create or change request, the reference 
> (idAlternative) is not created or updated. As the field is not nullable, 
> object creation fails altogether.
> See my Entities in the attachment. The JoinColumn is idAlternative. 
> 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)


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

2017-08-10 Thread Tilo Eilebrecht (JIRA)

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

Tilo Eilebrecht updated OLINGO-1156:

Environment: EclipseLink 2.5.2
Description: 
My project uses ODataJPAServiceFactory as described in the tutorial for JPA. I 
have an entity which references another entity with a ManyToOne relationship. 
If I submit a create or change request, the reference (idAlternative) is not 
created or updated. As the field is not nullable, object creation fails 
altogether.

See my Entities in the attachment. The JoinColumn is idAlternative. 

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.



  was:
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.





> 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
> Environment: EclipseLink 2.5.2
>Reporter: Tilo Eilebrecht
> Attachments: Alternative.java, Scope.java
>
>
> My project uses ODataJPAServiceFactory as described in the tutorial for JPA. 
> I have an entity which references another entity with a ManyToOne 
> relationship. If I submit a create or change request, the reference 
> (idAlternative) is not created or updated. As the field is not nullable, 
> object creation fails altogether.
> See my Entities in the attachment. The JoinColumn is idAlternative. 
> 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)


[jira] [Commented] (OLINGO-1146) CLONE - Cannot Filter on Navigation Property

2017-08-08 Thread Tilo Eilebrecht (JIRA)

[ 
https://issues.apache.org/jira/browse/OLINGO-1146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118274#comment-16118274
 ] 

Tilo Eilebrecht commented on OLINGO-1146:
-

I am experiencing this issue too.

> CLONE - Cannot Filter on Navigation Property
> 
>
> Key: OLINGO-1146
> URL: https://issues.apache.org/jira/browse/OLINGO-1146
> Project: Olingo
>  Issue Type: Bug
>  Components: odata2-jpa
>Affects Versions: V2 2.0.0
>Reporter: igor nemtsov
>Assignee: Michael Bolz
> Fix For: V2 2.0.8
>
> Attachments: olingo-414-exception.diff, olingo-414-patch.diff, 
> olingo-odata2-parent.patch
>
>
> We are receiving an error when we try to filter on a navigation property.  In 
> our solution we have a Notification entity and a User entity, we would like 
> to retrieve a specific Notification but only if it is linked to the 
> requesting user.  This would involve an ODATA request which filters on both 
> the UserId and the NotificationId.  An example of the URL we are invoking is:
> dspplatform.svc/Notifications?$filter=NotificationId%20eq%204%20and%20UserDetails/UserId%20eq%202
> This returns the following error:
> org.apache.olingo.odata2.core.edm.provider.EdmNavigationPropertyImplProv 
> cannot be cast to org.apache.olingo.odata2.api.edm.EdmProperty
> Can you please advise on how to perform filters on a Navigation property as 
> we need this as part of our core functionality?



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


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

2017-08-02 Thread Tilo Eilebrecht (JIRA)
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)