[jira] [Closed] (OLINGO-562) Spring support for Olingo v4 server

2017-10-02 Thread Michael Bolz (JIRA)

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

Michael Bolz closed OLINGO-562.
---
Resolution: Won't Fix

Hi,

because the issue is older then two years and affected version was beta is set 
I will close this.
For the case that someone has the same issue with current version please reopen.

Regards, Michael

> Spring support for Olingo v4 server
> ---
>
> Key: OLINGO-562
> URL: https://issues.apache.org/jira/browse/OLINGO-562
> Project: Olingo
>  Issue Type: New Feature
>Affects Versions: (Java) V4 4.0.0-beta-02
> Environment: Java, Spring 4
>Reporter: Thierry Templier
>Assignee: Michael Bolz
> Attachments: 
> 0001-OLINGO-562-split-the-code-between-the-generic-part-a.patch, 
> olingo-server-v4-spring-20150311.zip
>
>
> Hello,
> I have implemented a Spring support for Olingo v4 server side. It allows to 
> define declaratively within your Spring configuration:
> * EDM provider (see file 
> src/test/resources/applicationContext-edm-provider-namespace.xml)
> * HTTP handler 
> (src/test/resources/applicationContext-http-handler-namespace.xml)
> A dedicated servlet is provided to get an instance of ODataHttpHandler from a 
> Spring container and use it to handle request.
> You can find enclosed the corresponding code.
> I don't how such code can be integrated to Olingo. I think that it 
> corresponds more to an extension than something to put in the Olingo core.
> Feel free to give me your feedback.
> Thierry



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


[jira] [Updated] (OLINGO-605) Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB

2017-10-02 Thread Michael Bolz (JIRA)

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

Michael Bolz updated OLINGO-605:

Fix Version/s: V2 2.0.10

> Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB
> --
>
> Key: OLINGO-605
> URL: https://issues.apache.org/jira/browse/OLINGO-605
> Project: Olingo
>  Issue Type: New Feature
>  Components: odata2-jpa
>Affects Versions: V2 2.0.3
>Reporter: Manuel Blechschmidt
>Assignee: Michael Bolz
>Priority: Minor
>  Labels: GIS, custom, spatial, types
> Fix For: V2 2.0.10
>
>
> I am currently developing a software where I save GIS coordinates as part of 
> my entities. I want to send these geometries as a string through OData to a 
> client.
> Technically I do the following:
> OpenGis -> Hibernate Spatial -> JPA -> Olingo -> JavaScript -> OpenLayers
> I already have an XmlAdapter that maps my Geometry to WKT. I want to use this 
> as well for Olingo serialization
> I copied the following file in my workspace and extended the 
> convertToEdmSimpleType function:
> org.apache.olingo.odata2.jpa.processor.core.access.model.JPATypeConvertor
> {code:java}
>  public static EdmSimpleTypeKind
>   ...
> } else if(jpaType.equals(Geometry.class)) {
>   // "OData - JPA Type Converter: Type [class 
> com.vividsolutions.jts.geom.Geometry] not supported"
>   return EdmSimpleTypeKind.String;
> }
> throw 
> ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED
> .addContent(jpaType.toString()), null);
>   }
> {code}
> This is quick and dirty and it would be nice if there would be a cleaner 
> solution to do so.



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


[jira] [Resolved] (OLINGO-605) Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB

2017-10-02 Thread Michael Bolz (JIRA)

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

Michael Bolz resolved OLINGO-605.
-
Resolution: Fixed

> Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB
> --
>
> Key: OLINGO-605
> URL: https://issues.apache.org/jira/browse/OLINGO-605
> Project: Olingo
>  Issue Type: New Feature
>  Components: odata2-jpa
>Affects Versions: V2 2.0.3
>Reporter: Manuel Blechschmidt
>Assignee: Michael Bolz
>Priority: Minor
>  Labels: GIS, custom, spatial, types
>
> I am currently developing a software where I save GIS coordinates as part of 
> my entities. I want to send these geometries as a string through OData to a 
> client.
> Technically I do the following:
> OpenGis -> Hibernate Spatial -> JPA -> Olingo -> JavaScript -> OpenLayers
> I already have an XmlAdapter that maps my Geometry to WKT. I want to use this 
> as well for Olingo serialization
> I copied the following file in my workspace and extended the 
> convertToEdmSimpleType function:
> org.apache.olingo.odata2.jpa.processor.core.access.model.JPATypeConvertor
> {code:java}
>  public static EdmSimpleTypeKind
>   ...
> } else if(jpaType.equals(Geometry.class)) {
>   // "OData - JPA Type Converter: Type [class 
> com.vividsolutions.jts.geom.Geometry] not supported"
>   return EdmSimpleTypeKind.String;
> }
> throw 
> ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED
> .addContent(jpaType.toString()), null);
>   }
> {code}
> This is quick and dirty and it would be nice if there would be a cleaner 
> solution to do so.



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


[jira] [Commented] (OLINGO-605) Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB

2017-10-02 Thread Michael Bolz (JIRA)

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

Michael Bolz commented on OLINGO-605:
-

Hi [~manuel_b]

Thanks for the feature (see: https://github.com/apache/olingo-odata2/pull/4).
Based on this I updated the master (with minor changes to your pull request), 
see [commit 
7aac7976|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=7aac7976b3d576f3f24c8c0f4d75e0c7b1e96f95].

Again Thanks for the contribution.

Kind Regards, Michael


> Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB
> --
>
> Key: OLINGO-605
> URL: https://issues.apache.org/jira/browse/OLINGO-605
> Project: Olingo
>  Issue Type: New Feature
>  Components: odata2-jpa
>Affects Versions: V2 2.0.3
>Reporter: Manuel Blechschmidt
>Assignee: Michael Bolz
>Priority: Minor
>  Labels: GIS, custom, spatial, types
>
> I am currently developing a software where I save GIS coordinates as part of 
> my entities. I want to send these geometries as a string through OData to a 
> client.
> Technically I do the following:
> OpenGis -> Hibernate Spatial -> JPA -> Olingo -> JavaScript -> OpenLayers
> I already have an XmlAdapter that maps my Geometry to WKT. I want to use this 
> as well for Olingo serialization
> I copied the following file in my workspace and extended the 
> convertToEdmSimpleType function:
> org.apache.olingo.odata2.jpa.processor.core.access.model.JPATypeConvertor
> {code:java}
>  public static EdmSimpleTypeKind
>   ...
> } else if(jpaType.equals(Geometry.class)) {
>   // "OData - JPA Type Converter: Type [class 
> com.vividsolutions.jts.geom.Geometry] not supported"
>   return EdmSimpleTypeKind.String;
> }
> throw 
> ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED
> .addContent(jpaType.toString()), null);
>   }
> {code}
> This is quick and dirty and it would be nice if there would be a cleaner 
> solution to do so.



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


[jira] [Assigned] (OLINGO-605) Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB

2017-10-02 Thread Michael Bolz (JIRA)

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

Michael Bolz reassigned OLINGO-605:
---

Assignee: Michael Bolz

> Olingo should support custom types e.g. Geometry by using XmlAdapter from JaxB
> --
>
> Key: OLINGO-605
> URL: https://issues.apache.org/jira/browse/OLINGO-605
> Project: Olingo
>  Issue Type: New Feature
>  Components: odata2-jpa
>Affects Versions: V2 2.0.3
>Reporter: Manuel Blechschmidt
>Assignee: Michael Bolz
>Priority: Minor
>  Labels: GIS, custom, spatial, types
>
> I am currently developing a software where I save GIS coordinates as part of 
> my entities. I want to send these geometries as a string through OData to a 
> client.
> Technically I do the following:
> OpenGis -> Hibernate Spatial -> JPA -> Olingo -> JavaScript -> OpenLayers
> I already have an XmlAdapter that maps my Geometry to WKT. I want to use this 
> as well for Olingo serialization
> I copied the following file in my workspace and extended the 
> convertToEdmSimpleType function:
> org.apache.olingo.odata2.jpa.processor.core.access.model.JPATypeConvertor
> {code:java}
>  public static EdmSimpleTypeKind
>   ...
> } else if(jpaType.equals(Geometry.class)) {
>   // "OData - JPA Type Converter: Type [class 
> com.vividsolutions.jts.geom.Geometry] not supported"
>   return EdmSimpleTypeKind.String;
> }
> throw 
> ODataJPAModelException.throwException(ODataJPAModelException.TYPE_NOT_SUPPORTED
> .addContent(jpaType.toString()), null);
>   }
> {code}
> This is quick and dirty and it would be nice if there would be a cleaner 
> solution to do so.



--
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=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)