-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't remove on Many-To-Many relations #31
Comments
@doug-martin I debugged and found that position of parameters ( async removeRelations<Relation>(
id: string | number,
relationName: string,
relationIds: (string | number)[],
): Promise<DTO> {
const entity = await this.repo.findOneOrFail(id);
await this.createRelationQueryBuilder(entity, relationName).remove(relationIds);
return this.assembler.convertToDTO(entity);
} It should be async removeRelations<Relation>(
relationName: string,
id: string | number,
relationIds: (string | number)[],
): Promise<DTO> {
const entity = await this.repo.findOneOrFail(id);
await this.createRelationQueryBuilder(entity, relationName).remove(relationIds);
return this.assembler.convertToDTO(entity);
} |
I'm glad if you give me permissions to create PR for this issue |
doug-martin
added a commit
that referenced
this issue
Feb 23, 2020
* [FIXED] Can't remove on Many-To-Many relations [#31]
Merged
doug-martin
added a commit
that referenced
this issue
Feb 23, 2020
* [FIXED] Can't remove on Many-To-Many relations [#31]
Fixed and published Thanks for the bug report! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @doug-martin,
I trying to add a many relation to my user resolver, I can call add many, but I can't call with remove many and it reports an error like this:
The text was updated successfully, but these errors were encountered: