You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module.exports={attributes: {hash: {type: 'string',unique: true,primaryKey: true},id: 'integer',// from 1 to 20 (not unique)active: 'boolean',
...
}}
Response from Google Analytics API is stored here (I want to save same field names).
'id' is returned from Google and it is not unique (may be only 20 goals for GA counter), so I use my 'hash' field as PK
The problem is that on update actionUtil.parseValues returns object like that:
{hash: '<myhash>',id: '<myhash>',name: 'newName'}
and it brakes my data
when I send PUT /goal/<myhash>{active: false}
blueprint set
{id: '<myhash>',active: false}
I figured it out by overriding GoalController.update, but is there any way possible to fix this issue?
Hope, you understood what I wanted to say 😄
The text was updated successfully, but these errors were encountered:
swarthy
changed the title
actionUtil.parseValues return 'id' field even when Model.primaryKey is not 'id'
actionUtil.parseValues returns 'id' field even if Model.primaryKey is not 'id'
Mar 1, 2016
Model Goal.js:
Response from Google Analytics API is stored here (I want to save same field names).
'id' is returned from Google and it is not unique (may be only 20 goals for GA counter), so I use my 'hash' field as PK
The problem is that on update
actionUtil.parseValues
returns object like that:and it brakes my data
when I send
PUT /goal/<myhash>
{active: false}
blueprint set
I figured it out by overriding GoalController.update, but is there any way possible to fix this issue?
Hope, you understood what I wanted to say 😄
The text was updated successfully, but these errors were encountered: