Notice of a potential bug
See original GitHub issueHey,
I am fairly confident I have found a bug as I have seen this issue crop up now in two different scenarios. When running against my local mysql docker instance I have no issues but when running against Aurora Serverless MySql I have encountered the error:
"'param_1'' is an invalid type"
(well, param_X)
This is my log:
INFO query: SELECT `NewCompany`.`id` AS `NewCompany_id`, `NewCompany`.`name` AS `NewCompany_name`, `NewCompany`.`websiteUrl` AS `NewCompany_websiteUrl`, `NewCompany`.`numberOfEmployees` AS `NewCompany_numberOfEmployees`, `NewCompany`.`suggestedCategories` AS `NewCompany_suggestedCategories`, `NewCompany__existingCategories`.`updatedAt` AS `NewCompany__existingCategories_updatedAt`, `NewCompany__existingCategories`.`createdAt` AS `NewCompany__existingCategories_createdAt`, `NewCompany__existingCategories`.`version` AS `NewCompany__existingCategories_version`, `NewCompany__existingCategories`.`id` AS `NewCompany__existingCategories_id`, `NewCompany__existingCategories`.`name` AS `NewCompany__existingCategories_name`, `NewCompany__existingCategories`.`parentId` AS `NewCompany__existingCategories_parentId` FROM `new_company` `NewCompany` LEFT JOIN `new_company_existing_categories_company_category` `NewCompany_NewCompany__existingCategories` ON `NewCompany_NewCompany__existingCategories`.`newCompanyId`=`NewCompany`.`id` LEFT JOIN `company_category` `NewCompany__existingCategories` ON `NewCompany__existingCategories`.`id`=`NewCompany_NewCompany__existingCategories`.`companyCategoryId` WHERE (`NewCompany`.`id` IN (:param_0)) AND `NewCompany`.`id` IN (:param_1) -- PARAMETERS: [
{
"param_0": "ccca5f74-5dbd-485c-86a1-925622aeea61",
"param_1": [
"ccca5f74-5dbd-485c-86a1-925622aeea61"
]
}
I am going to have to try and find some time to reproduce an example for diagnosis. However the original time I saw this error it was rather obvious - there were two parameters which were being passed in the wrong way around. It’s worth noting that I am using this in conjunction with typeorm-transactional-cls-hooked
.
I understand this isn’t a very good issue report but I wanted to at least mention it in the event this is something you have come across yourself.
I am using this driver in production so I need to resolve this as soon as possible 😃
Versions:
"typeorm": "^0.2.19",
"typeorm-aurora-data-api-driver": "^1.1.4",
"typeorm-transactional-cls-hooked": "^0.1.8"
Issue Analytics
- State:
- Created 4 years ago
- Comments:33 (15 by maintainers)
Top GitHub Comments
@ArsenyYankovsky after doing the update to latest typeorm (0.2.20) that param thing is ok now. With 0.2.19, or any smaller version there is that issue with params in the wrong order.
@TreeMan360 I’ve submitted the PR to TypeORM https://github.com/typeorm/typeorm/pull/4779. Unfortunately, we’ll have to wait for the PR to be merged and a new TypeORM version released for it to work. In the meantime you can try to use my fork of TypeORM to work.