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
It seems that @EntityFromBody won't work when there are extra unrelated fields. The post body has to be entirely the same as the entity. I can't pass extra fields for non database stuff like a form token alongside the entity data or it will throw TypeError: Cannot read property 'prototype' of undefined. Is that true?
TypeError: Cannot read property 'prototype' of undefined
at Broadcaster.isAllowedListener (/home/node/src/subscriber/Broadcaster.ts:247:71)
at /home/node/src/subscriber/Broadcaster.ts:58:92
at Array.filter (native)
at Broadcaster.<anonymous> (/home/node/src/subscriber/Broadcaster.ts:58:14)
at step (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:32:23)
at Object.next (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:13:53)
at /home/node/node_modules/typeorm/subscriber/Broadcaster.js:7:71
at __awaiter (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:3:12)
at Broadcaster.broadcastBeforeInsertEvent (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:104:16)
at /home/node/src/subscriber/Broadcaster.ts:31:67
at Array.map (native)
at Broadcaster.<anonymous> (/home/node/src/subscriber/Broadcaster.ts:31:47)
at step (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:32:23)
at Object.next (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:13:53)
at /home/node/node_modules/typeorm/subscriber/Broadcaster.js:7:71
at __awaiter (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:3:12)
at Broadcaster.broadcastBeforeEventsForAll (/home/node/node_modules/typeorm/subscriber/Broadcaster.js:57:16)
at SubjectOperationExecutor.<anonymous> (/home/node/src/persistence/SubjectOperationExecutor.ts:111:47)
at step (/home/node/node_modules/typeorm/persistence/SubjectOperationExecutor.js:32:23)
at Object.next (/home/node/node_modules/typeorm/persistence/SubjectOperationExecutor.js:13:53)
at fulfilled (/home/node/node_modules/typeorm/persistence/SubjectOperationExecutor.js:4:58)
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
The text was updated successfully, but these errors were encountered:
laukaichung
changed the title
Does postData fields have to be exactly the same as the entity columns in order to use @EntityFromBody()?
Does postData field have to be exactly the same as the entity columns in order to use @EntityFromBody()?
Feb 9, 2017
laukaichung
changed the title
Does postData field have to be exactly the same as the entity columns in order to use @EntityFromBody()?
Do postData fields have to be exactly the same as the entity columns in order to use @EntityFromBody()?
Feb 9, 2017
I have this entity
It seems that @EntityFromBody won't work when there are extra unrelated fields. The post body has to be entirely the same as the entity. I can't pass extra fields for non database stuff like a form token alongside the entity data or it will throw
TypeError: Cannot read property 'prototype' of undefined
. Is that true?Error:
The text was updated successfully, but these errors were encountered: