Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] How to reference another object when inserting with post
[Texo] How to reference another object when inserting with post [message #1089415] Sun, 18 August 2013 18:08 Go to next message
Micha-Jamie Guthmann is currently offline Micha-Jamie GuthmannFriend
Messages: 13
Registered: October 2012
Junior Member
When I want to insert an object with a post request like laid out here http://wiki.eclipse.org/Texo/JSON_REST_Web_Services#Insert.2FUpdate_Operation I have to specify the json data. If the object gets a reference to an existing other object, how would I specify that other object?





Re: [Texo] How to reference another object when inserting with post [message #1090203 is a reply to message #1089415] Mon, 19 August 2013 21:21 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Micha-Jamie,
A reference should look something like this with the _uri (this example is a reference from a book to its author):
"author": {
"_uri": "http://localhost:8080/org.eclipse.emf.texo.web.example/jsonws/library|Writer/22#"
}

or you can try without the uri but with the _eclass and db_Id (the database id efeature of this example):

"author": {
"_eclass": "library|Writer",
"db_Id": 22
},

gr. Martin

ps: I am on holiday so therefore answers take a bit longer..

On 08/18/2013 08:08 PM, Micha-Jamie Guthmann wrote:
> When I want to insert an object with a post request like laid out here
> http://wiki.eclipse.org/Texo/JSON_REST_Web_Services#Insert.2FUpdate_Operation I have to specify the json data. If the
> object gets a reference to an existing other object, how would I specify that other object?
>
>
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:[Edapt] How to migrate models serialized in binary files?
Next Topic:[Texo] Setup Webserver and EMF Client with JSONTexoResource
Goto Forum:
  


Current Time: Thu Apr 25 04:47:27 GMT 2024

Powered by FUDForum. Page generated in 0.02312 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top