[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5803:
---------------------------------------
Ok, this looks fine,
I assume I can then build from the olingo repository once the changes are in. I did this for the teiid 11 iteration as well, because the last olingo release took ages to be released. Could you please provide a reminder here once the fix went into the olingo sources at github? Thanks for your help!
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5803:
---------------------------------------
> Is this something you can solve
Yes
> or do you expect that this will involve a longer cycle?
This will require a new release of olingo to be addressed without some sort of local patching. A best guess would be in Teiid 13.
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5803:
---------------------------------------
Hello Steven,
thanks for the update.
>> That looks like a bug as 11.4.2 should apply. This will need addressed in the olingo source.
Is this something you can solve, or do you expect that this will involve a longer cycle? I am wondering if I should better search for a workaround for my app. Thanks!
Best regards,
Christoph
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Steven Hawkins reopened TEIID-5803:
-----------------------------------
Sorry for the confusion. $ref only works for relating existing entities, so the payload is just an array of id urls. The error message from attempting the initial post had confused me. It's coming from: https://github.com/apache/olingo-odata4/blob/1fef3a131ea4cc334151a7f10b67...
That looks like a bug as 11.4.2 should apply. This will need addressed in the olingo source.
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5803:
----------------------------------
Component/s: OData
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5803 at 8/23/19 6:29 PM:
----------------------------------------------------------------
Hello Steven,
when using the $ref I still get the following error:
HTTP/1.1 405 Method Not Allowed
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Fri, 23 Aug 2019 20:55:24 GMT
Allow: GET,POST,PUT,PATCH,DELETE
Connection: keep-alive
Access-Control-Allow-Origin: *
Content-Type: application/json;odata.metadata=minimal
Content-Length: 85
OData-Version: 4.0
{"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
Is there possibly something I need to specify in the vdb in order to get the navigation property updatable?
As mentioned, in the direct case (call to collection) a direct insert into the collection calls the INSTEAD OF INSERT trigger on the view and the insert works.
The view has the following options set OPTIONS(UPDATABLE 'TRUE')
Here you can download an example compose file. First curl scripts shows running insert on collection second one failing script on navigation property
https://c.gmx.net/@328076122686231878/-lgX5GIgRum5frT7m1oIoA
was (Author: cjohn001):
Hello Steven,
when using the $ref I still get the following error:
HTTP/1.1 405 Method Not Allowed
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Fri, 23 Aug 2019 20:55:24 GMT
Allow: GET,POST,PUT,PATCH,DELETE
Connection: keep-alive
Access-Control-Allow-Origin: *
Content-Type: application/json;odata.metadata=minimal
Content-Length: 85
OData-Version: 4.0
{"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
Is there possibly something I need to specify in the vdb in order to get the navigation property updatable?
As mentioned, in the direct case (call to collection) a direct insert into the collection calls the INSTEAD OF INSERT trigger on the view and the insert works.
The view has the following options set OPTIONS(UPDATABLE 'TRUE')
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5803 at 8/23/19 5:09 PM:
----------------------------------------------------------------
Hello Steven,
when using the $ref I still get the following error:
HTTP/1.1 405 Method Not Allowed
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Fri, 23 Aug 2019 20:55:24 GMT
Allow: GET,POST,PUT,PATCH,DELETE
Connection: keep-alive
Access-Control-Allow-Origin: *
Content-Type: application/json;odata.metadata=minimal
Content-Length: 85
OData-Version: 4.0
{"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
Is there possibly something I need to specify in the vdb in order to get the navigation property updatable?
As mentioned, in the direct case (call to collection) a direct insert into the collection calls the INSTEAD OF INSERT trigger on the view and the insert works.
The view has the following options set OPTIONS(UPDATABLE 'TRUE')
was (Author: cjohn001):
Hello Steven,
when using the $ref I still get the following error:
HTTP/1.1 405 Method Not Allowed
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Fri, 23 Aug 2019 20:55:24 GMT
Allow: GET,POST,PUT,PATCH,DELETE
Connection: keep-alive
Access-Control-Allow-Origin: *
Content-Type: application/json;odata.metadata=minimal
Content-Length: 85
OData-Version: 4.0
{"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
Is there possibly something I need to specify in the vdb in order to get the navigation property updatable? A direct insert into the collection calls the INSTEAD OF INSERT trigger on the view.
The view has the following options set OPTIONS(UPDATABLE 'TRUE')
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5803 at 8/23/19 5:07 PM:
----------------------------------------------------------------
Hello Steven,
when using the $ref I still get the following error:
HTTP/1.1 405 Method Not Allowed
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Fri, 23 Aug 2019 20:55:24 GMT
Allow: GET,POST,PUT,PATCH,DELETE
Connection: keep-alive
Access-Control-Allow-Origin: *
Content-Type: application/json;odata.metadata=minimal
Content-Length: 85
OData-Version: 4.0
{"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
Is there possibly something I need to specify in the vdb in order to get the navigation property updatable? A direct insert into the collection calls the INSTEAD OF INSERT trigger on the view.
The view has the following options set OPTIONS(UPDATABLE 'TRUE')
was (Author: cjohn001):
Hello Steven,
when using the $ref I still get the following error:
HTTP/1.1 405 Method Not Allowed
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Fri, 23 Aug 2019 20:55:24 GMT
Allow: GET,POST,PUT,PATCH,DELETE
Connection: keep-alive
Access-Control-Allow-Origin: *
Content-Type: application/json;odata.metadata=minimal
Content-Length: 85
OData-Version: 4.0
{"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
Is there possibly something I need to specify in the vdb in order to get the navigation property updatable? A direct insert into the collection calls the INSTEAD OF INSERT trigger on the view.
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5803) Seems to be not possible to POST a new entity via a navigation property to a collection
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5803?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5803:
---------------------------------------
Hello Steven,
when using the $ref I still get the following error:
HTTP/1.1 405 Method Not Allowed
Expires: 0
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Date: Fri, 23 Aug 2019 20:55:24 GMT
Allow: GET,POST,PUT,PATCH,DELETE
Connection: keep-alive
Access-Control-Allow-Origin: *
Content-Type: application/json;odata.metadata=minimal
Content-Length: 85
OData-Version: 4.0
{"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
Is there possibly something I need to specify in the vdb in order to get the navigation property updatable? A direct insert into the collection calls the INSTEAD OF INSERT trigger on the view.
> Seems to be not possible to POST a new entity via a navigation property to a collection
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-5803
> URL: https://issues.jboss.org/browse/TEIID-5803
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
>
> Hello Steven,
> I am currently trying to post/create an entity in a collection via a relative binding path. Unfortunately, I always get an error saying
> {"error":{"code":null,"message":"HTTP method 'POST' not allowed for this resource."}}
> I have bound the root view to .../Account(1) from which I have a navigation property to the relevant collection. Currently I have trouble to post to collections via a navigation path.
> As far as I understood from
> http://docs.oasis-open.org/odata/odata/v4.01/csprd04/part1-protocol/odata...
> chapter 11.4.2 this should work according to my tries below.
> Might you tell me if my path via the navigation property should work for post requests or what I am doing wrong?
> Directly writing to the collection is fine, i.e. something like the following:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/UserDefinedProducts
> and a GET request via a navigation property path (given below) also works, but a path via a navigation property does not work when using the path in a POST request. I.e. when going via the navigation property. Example:
> curl --user sap:sap -i -X POST -H 'Content-Type: application/json;charset=UTF-8;IEEE754Compatible=true' -d '{"fkProfile":"1","idCode":null,"lc":"de","product_name":"A Product","brands":"A brand","energy_100g":2259,"carbohydrates_100g":60.08,"sugars_100g":10.1,"proteins_100g":24.03,"fat_100g":15.89,"saturated_fat_100g":10.0,"salt_100g":1.0}' http://localhost:18080/odata4/svc/my_nutri_diary/Account\(1\)/UserDefined...
> Here you find the backend metadata. They show that UserDefinedProducts_fKUserDefinedProductToAccount is simply a navigaton path from Account(xxx) to the UserDefinedProducts collection.
> https://ecubed-solutions.ddnss.de/odata4/svc/my_nutri_diary/$metadata
> user: sap
> password: sap
> Thanks a lot for your help!
> Note: I am currently trying to add data via a navigation property path because my frontend library sapui5 only caches and syncs data queried via a single context binding. Hence, to be consistent via all views in my app which bind to the odata model, I need to use only one absolute binding and have to query/update other contexts via relative binding paths from this single absolute path, to allow for all frontend views to maintain data consistency
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months
[JBoss JIRA] (TEIID-5797) Please add FULLTEXT indexes and efficient fulltext search to materialized tables
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5797?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5797:
----------------------------------
Fix Version/s: 13.x
> Please add FULLTEXT indexes and efficient fulltext search to materialized tables
> ---------------------------------------------------------------------------------
>
> Key: TEIID-5797
> URL: https://issues.jboss.org/browse/TEIID-5797
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.x
>
>
> Hello,
> this feature request is to enhance performance in case of materialized table usage. The idea is to offload database workload to several Teiid instances using materialized tables for serving text search requests. It would be great to have an efficient index-based fulltext search feature available on them. Similar to the MATCH AGAINST functionality and FULLTEXT indexes on a mysql database. Hence indexing and matching against single words in one or multiple database columns.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 4 months