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
Problem is, when he gets to the setter, it throws the following error:
TypeError: Association.save is not a function
at saveAssociation (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/orm/lib/Associations/Many.js:378:19)
at Object.exports.wait (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/orm/lib/Hook.js:26:10)
at saveNextAssociation (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/orm/lib/Associations/Many.js:423:12)
at run (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/orm/lib/Associations/Many.js:427:12)
at Object.value (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/orm/lib/Associations/Many.js:452:5)
at Query._callback (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/orm/lib/Associations/Many.js:294:39)
at Query.Sequence.end (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/mysql/lib/protocol/sequences/Sequence.js:86:24)
at Query._handleFinalResultPacket (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/mysql/lib/protocol/sequences/Query.js:137:8)
at Query.OkPacket (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/mysql/lib/protocol/sequences/Query.js:72:10)
at Protocol._parsePacket (/Users/joaomiguelrodrigues/Desktop/FCUL/ProjetoFinal/node_modules/mysql/lib/protocol/Protocol.js:280:23)
I tried doing this because the getter was returning an empty array, even thou I entered an insert query into database.
Does anyone know why this happens? Or how to solve this? Thanks!
Hi!
Apparently, my server crashes when I try to use a setter in a hasMany relationship.
I have this:
And I have a route that gets me every song from a owner, and for each, I want to set a gender. For that, I do this:
Problem is, when he gets to the setter, it throws the following error:
I tried doing this because the getter was returning an empty array, even thou I entered an insert query into database.
Does anyone know why this happens? Or how to solve this? Thanks!
Versions:
"node": "^3.10.9",
"mysql": "^2.13.0",
"orm": "^3.2.3",
The text was updated successfully, but these errors were encountered: