Closed cra-gb closed 8 years ago
Hello,
I am having issues with a many to many table relationship where table a and table c are associated by table b. The relationship shouldn't be the issue as I am returned the following information:
[ anonymous { pl_id: 97, pl_public_name: 'North', pl_identifier: '66143c4a-2c2c-11e6-bd89-0242ac160002', ca_id: 201, ca_public_name: 'Name 10', ca_description: 'Description 10', ca_icon: null, ca_start_date: 2016-06-06T21:19:48.951Z, ca_end_date: 2016-06-11T21:19:48.951Z }, anonymous { pl_id: 98, pl_public_name: 'South', pl_identifier: '6614645e-2c2c-11e6-bd89-0242ac160002', ca_id: 201, ca_public_name: 'Name 10', ca_description: 'Description 10', ca_icon: null, ca_start_date: 2016-06-06T21:19:48.951Z, ca_end_date: 2016-06-11T21:19:48.951Z }, anonymous { pl_id: 99, pl_public_name: 'East', pl_identifier: '661464f4-2c2c-11e6-bd89-0242ac160002', ca_id: 201, ca_public_name: 'Name 10', ca_description: 'Description 10', ca_icon: null, ca_start_date: 2016-06-06T21:19:48.951Z, ca_end_date: 2016-06-11T21:19:48.951Z }, anonymous { pl_id: 100, pl_public_name: 'West', pl_identifier: '66146562-2c2c-11e6-bd89-0242ac160002', ca_id: 201, ca_public_name: 'Name 10', ca_description: 'Description 10', ca_icon: null, ca_start_date: 2016-06-06T21:19:48.951Z, ca_end_date: 2016-06-11T21:19:48.951Z } ]
The maps are as follows
let result_maps = [ { mapId: 'ca_map', idProperty: 'id', properties: ['public_name', 'description', 'icon', 'start_date', 'end_date'], collections: [ {name: 'pl', mapId: 'pl_map', column_prefix: 'pl_'} ] }, { mapId: 'pl_map', idProperty: 'id', properties: ['public_name', 'identifier'] } ];
What I am expecting is
id: 201, public_name: "Name 10", description: "Description 10", icon: null, start_date: "2016-06-06T21:19:48.951Z", end_date: "2016-06-11T21:19:48.951Z", pl: [ { }, { }, { }, { } ] } ]
But as you can see the pl array is returning empty objects.
What am I missing?
Thanks.
Nevermind. I just realized I had columnPrefix as column_prefix. Too much time spent staring at code.
Sorry for the false alarm!
No worries :-)
Hello,
I am having issues with a many to many table relationship where table a and table c are associated by table b. The relationship shouldn't be the issue as I am returned the following information:
The maps are as follows
What I am expecting is
But as you can see the pl array is returning empty objects.
What am I missing?
Thanks.