bulk_data_source icon indicating copy to clipboard operation
bulk_data_source copied to clipboard

toMany relationships with different datahash key's don't seem to work

Open elffey opened this issue 14 years ago • 0 comments

if you define a different key for your toMany attribute than is returned from your server, normalizeAssociationsFromServer() won't convert the data from an array of objects to an array of IDs as intended.

on line 205 of bulk.js (normalizeAssociationsFromServer()) there is the line:

attrType = recordType.prototype[prop];

where prop is the key for the attriibute in the retrieved JSON. However if the attribute has a custom key then attrType will be undefined even though there is valid data for the association in the hash.

elffey avatar Jul 03 '11 13:07 elffey