fix: eager load belongs to many association (#1906)
This commit is contained in:
parent
e27cff15c9
commit
5288cbb1cf
@ -242,7 +242,7 @@ export class EagerLoadingTree {
|
|||||||
|
|
||||||
for (const instance of node.instances) {
|
for (const instance of node.instances) {
|
||||||
const parentInstance = node.parent.instances.find(
|
const parentInstance = node.parent.instances.find(
|
||||||
(parentInstance) => parentInstance.get(sourceKey) == instance.get(oneFromTarget.as).get(foreignKey),
|
(parentInstance) => parentInstance.get(sourceKey) == instance[oneFromTarget.as].get(foreignKey),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (parentInstance) {
|
if (parentInstance) {
|
||||||
|
@ -24,6 +24,12 @@ describe('role check action', () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await role.createMenuUiSchema({
|
||||||
|
values: {
|
||||||
|
name: 'test',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const user = await db.getRepository('users').create({
|
const user = await db.getRepository('users').create({
|
||||||
values: {
|
values: {
|
||||||
roles: ['test'],
|
roles: ['test'],
|
||||||
|
Loading…
Reference in New Issue
Block a user