[ https://issues.apache.org/jira/browse/OLINGO-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul updated OLINGO-1222: ------------------------- Component/s: (was: odata4-samples) odata2-core > Unable to create navigation links in Cars Project > ------------------------------------------------- > > Key: OLINGO-1222 > URL: https://issues.apache.org/jira/browse/OLINGO-1222 > Project: Olingo > Issue Type: Bug > Components: odata2-core > Affects Versions: V2 2.0.10 > Environment: OSX & Windows > Reporter: Paul > Priority: Major > > When I create the Cars project from the default commands and use the generate > data function, the data is generated correctly and all the links such as from > a car to a driver work fine. > > Opening postman, I then go and add a new car which also works fine. If I > attempt to add a driver to a car then I am getting an "Requested entity could > not be found". > > I created a Car with id of 14 > URI: > [http://localhost:8080/|http://localhost:8080/CarService.svc/Cars] > [MyFormula.svc|http://localhost:8080/MyFormula.svc/Cars('14')/$links/Driver] > [/Cars|http://localhost:8080/CarService.svc/Cars] > Headers > Content-Type: application/json > Body: > { > "Id":"14", > "Model":"Paul", > "Price":"132", > "ModelYear":2013 > } > > I now want to link a driver to this car > If I do a post > URI: > [http://localhost:8080/MyFormula.svc/Cars('14')/$links/Driver] > Headers: > Content-Type: application/json > Body: > { > "Id": "23", > "Name":"Jody", > "Lastname":"Schecter", > "Nickname":"SAMan" > } > > Then it does not work. and raises the error "Requested entity could not be > found". > > If I try to manually link them via a put on the car this also fails. > > I first create the driver above manually by posting to the Drivers collection. > I do a PUT > URI: > http://localhost:8080/MyFormula.svc/Cars('14')/$links/Driver > Headers: > content-type: application/xml > Body: > ?xml version="1.0" encoding="utf-8" standalone="yes"?> > <uri xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> > http://localhost:8080/MyFormula.svc/Drivers(23L) > </uri> > > this also fails > > Any ideas why this would not work? The links seem fine for those created by > the script in the source code but external creation does not allow links to > be set up -- This message was sent by Atlassian JIRA (v7.6.3#76005)