Hi gang, In my dissertation, I provided a mathematical model/ reverse engineering of the ERRest model. Technically, multiple entries would simply be an array or dictionary of the entries in question. Thus, the multiple entries could entail a façade on the entities representing the entries in question.
An alternative I have toyed with is a second app that provides query space based on domain relational calculus (restricted to the methods in ERD-Q / ERDKeys). V/R, Daniel Beatty, Ph.D., IEEE Certified Software Development Professional (CSDP) Computer Scientist Code 474300D 1 Administration Circle. M/S 1109 China Lake, CA 93555 [email protected] (760)939-7097 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Fred Opims Sent: Saturday, August 29, 2015 12:30 PM To: Mark Wardle Cc: webobjects-dev Subject: Re: ERRest: Multiple entries Hi Marc! Thank you very much for this response. I will try it and let you know ! Have a good week end ! Ruddy On Friday, August 28, 2015, Mark Wardle <[email protected]> wrote: Hi Fred, ERRest is just a set of convenience methods around direct actions. If you step through the code on how an update works, you could duplicate this to support multiple entries as you require. So have a look at ERXRestRequestNode which gives you a format-agnostic tree of the body of the request. You could then manually parse that, iterate an array and then call the create method with the data. @POST @Path("/patients/{patient:Patient}/encounters/{encounter:Encounter}/forms") public WOActionResults createFormAction(@PathParam("patient") Patient patient, @PathParam("encounter") Encounter encounter) { if (ERXEOControlUtilities.eoEquals(patient, encounter.patient())) { ERXRestRequestNode documentNode = requestNode(); so if I were expecting an array, I might do this for (ERXRestRequestNode child : documentNode.children()) { Object o = child.createObjectWithFilter(entityName, filter, restContext); //…. etc } I haven’t tested this - typing in email not eclipse - but if you examine the source code for ERRest, you should be able to do what you want. It just looks like magic because of all of the convenience methods (e.g. create() method). b/w Mark On 23 Aug 2015, at 21:08, Fred Opims <[email protected] <javascript:_e(%7B%7D,'cvml','[email protected]');> > wrote: Hello! I'm using ERRest and to create an entry, I'm using the POST HTTP method with JSON format. For example, to create one entity User, I will execute the request with the following post in the body {"name":"Fred"} as shown in the image: <Screen Shot 2014-08-26 at 3.25.41 PM.png> Is there a way to create multiple entries in one time ? By multiples entries, i mean an array of the same object. Let's say : {"name":"Freddy"}, {"name":"Eric"} {"name":"Andre"} ... {"name":"Pascal"} I've tried to put the entries into an array but it does not work: [{"name":"Freddy"},{"name":"Eric"},{"name":"Andre"}] How can I create 100 Users entities in one time ? Thank you. Fred _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected] <javascript:_e(%7B%7D,'cvml','[email protected]');> ) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/mark%40wardle.org This email sent to [email protected] <javascript:_e(%7B%7D,'cvml','[email protected]');>
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
