Typeorm is adding "_rid" to my relation name
carlosaldaravi opened this issue · comments
I'm submitting a...
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
My project has no errors, i'm getting data from postman but when i try to post something, i'm getting an error. Seems like typeorm is adding "_rid" to my relations
Expected behavior
Just Post endpoint
Minimal reproduction of the problem with instructions
async createStudent(
createStudentDto: CreateStudentDto,
user: User,
): Promise<any> {
const foundUser = await User.findOne(user.id);
foundUser.details = createStudentDto.details;
foundUser.sports = createStudentDto.sports;
foundUser.level = createStudentDto.level;
foundUser.calendar = createStudentDto.calendar;
foundUser.save();
}
query failed: SELECT User_targets_rid.target_id AS "target_id", User_targets_rid.student_id AS "student_id" FROM "targets" "targets" INNER JOIN "student_targets" "User_targets_rid" ON (User_targets_rid.student_id = $1 AND User_targets_rid.target_id = "targets"."id") ORDER BY User_targets_rid.target_id ASC, User_targets_rid.student_id ASC -- PARAMETERS: [108]
What is the motivation / use case for changing the behavior?
is not working
Environment
Nest version: 7.1.4
For Tooling issues:
- Node version: 12.16.3
- Platform: Mac
Others:
macOS Catalina
Please, report this issue in the typeorm repository