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
I am having trouble saving models which have a many-to-many relationship. Is this supported? I have a many-to-many relationship between users and roles. I have created the join table that sails requires, 'role_users__user_roles' in dynamodb. When I run my migration script to seed the database with an admin user and his corresponding roles, I get the following error:
Waterline Error: { originalError:
{ [Error: the value of id is not allowed to be undefined]
details: [ [Object] ],
_object:
{ role_users: '9c7d4258-fdd1-4cd4-a0b7-073a14c70529',
user_roles: 'f098d269-7815-4c92-bea4-ed3cca63c4f9' },
message: 'the value of id is not allowed to be undefined' } }
It appears that the dynamodb adapter is not auto-generating the required id field value. I was able to get around this for basic models by generating the uuids in sails based upon the suggestion in another issue thread, however am unsure how to do this for join table entries.
The text was updated successfully, but these errors were encountered:
I am having trouble saving models which have a many-to-many relationship. Is this supported? I have a many-to-many relationship between users and roles. I have created the join table that sails requires, 'role_users__user_roles' in dynamodb. When I run my migration script to seed the database with an admin user and his corresponding roles, I get the following error:
It appears that the dynamodb adapter is not auto-generating the required id field value. I was able to get around this for basic models by generating the uuids in sails based upon the suggestion in another issue thread, however am unsure how to do this for join table entries.
The text was updated successfully, but these errors were encountered: