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
Describe the bug
When using a custom typed PK (see #1798), ManyToMany using a pivotTable doesn't work. The map returned from
await this.driver.loadFromPivotTable()
does not contain converted keys and thus the lookup fails.
map[entity.__helper.getSerializedPrimaryKey()]
is undefined.
Stacktrace
TypeError: Cannot read property 'map' of undefined
at EntityLoader.findChildrenFromPivotTable (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:232:69)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async EntityLoader.populateField (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:185:25)
at async EntityLoader.populate (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:37:13)
at async EntityLoader.populateField (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:203:9)
at async EntityLoader.populate (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:37:13)
at async SqlEntityManager.find (/app/node_modules/@mikro-orm/core/EntityManager.js:105:9)
at async EntityLoader.populateMany (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:127:22)
at async EntityLoader.populateField (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:187:9)
at async EntityLoader.populate (/app/node_modules/@mikro-orm/core/entity/EntityLoader.js:37:13)
To Reproduce
Steps to reproduce the behavior:
Create the entities with the custom type from #1798.
Describe the bug
When using a custom typed PK (see #1798), ManyToMany using a pivotTable doesn't work. The map returned from
does not contain converted keys and thus the lookup fails.
is undefined.
Stacktrace
To Reproduce
Steps to reproduce the behavior:
Create the entities with the custom type from #1798.
Versions
The text was updated successfully, but these errors were encountered: