Page 1 of 1

Including related object on the Users collection

Posted: Fri Aug 02, 2013 10:11 am
by Dupdroid

I have created a user_read_service according to your documentation. In my Users table I added a pointer column to the agency collection. The REST service returns a response as expected but I can't get the include parameter to work.

{
"createdAt":"2013-03-29 17:40:43.918",
"id":"5100b21bh4b55ae32e264457",
"updatedAt":"2013-08-02 08:03:01.720",
"agency":{
"collName":"agency",
"id":"5199b558e4b00dd32e2611b6"
},
"username":"x2xx"
}

I'd like the "acency" column to be fully included in the response.


Including related object on the Users collection

Posted: Fri Aug 02, 2013 11:53 am
by Maryna Brodina

Hello! Did you create service manually or through Create New - Database Services? Could you also post DB screenshots (both tables) and REST service settings (Request and Test tabs)?


Including related object on the Users collection

Posted: Fri Aug 02, 2013 1:36 pm
by Dupdroid

I had to create it manually because you can't create a new service from the Users table using the Create New - Database Services method.

Image

Image

Image

Image


Including related object on the Users collection

Posted: Fri Aug 02, 2013 4:33 pm
by Kateryna Grynko

Hi Christo,

We suggest you to create a second request by received record _id as a workaround.


Including related object on the Users collection

Posted: Fri Aug 02, 2013 6:21 pm
by Dupdroid

Is this a bug? Why does the system allow me to add pointer columns to the Users table while the include feature does not work? En extra request means extra calla to the back-end. I would rather not implement workarounds which would put a handicap on performance.


Including related object on the Users collection

Posted: Fri Aug 02, 2013 6:28 pm
by Kateryna Grynko

Christo,

Sorry, we still don't know. We are searching.


Including related object on the Users collection

Posted: Fri Aug 02, 2013 8:44 pm
by Kateryna Grynko

This is definitely a bug, will be fixed.


Including related object on the Users collection

Posted: Wed Aug 07, 2013 2:38 pm
by Kateryna Grynko

Hi Christo,

This will be fixed in the nearest release. For now, there is a workaround. You can create a request with include if use the following URL in service:
code{database_url}/collections/_users/code


Including related object on the Users collection

Posted: Mon Nov 04, 2013 10:59 am
by Maryna Brodina

Hello! This bug should be fixed now.