Am 01.02.2017 um 15:25 schrieb sergio ruiz <sergio.rrd@gmail.com>:

Hi, all..

I am working on a Teapot REST interface, and am getting ready to implement the create, read, and update methods for the objects, and I need a way to refer to the objects. I figured that since Voyage was already creating _id through MongoDB, I could just pass that on when I retrieved that object, but I don���t see how to do that.

Is this possible? Would I need to create my own numerical indexes to my objects and just retrieve them as part of the object query?


You can ask every voyage object for its id. Just do 

anObject voyageId

you get an OID object which you can ask for its #value to get the numeric id.

Norbert

Thanks!