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
Incorrect propagation of one-to-one relation when using BigInt PKs and BigIntType #578
Comments
Just a guess, but is your FK column ( |
Yes, both are BIGINT(20) |
As a workaround/fix i added driverOptions: {
connection: {
supportBigNumbers: true,
bigNumberStrings: true
}
} to the mikro orm config. I saw that for mariadb, the framework is using mysql knex dialect and overriding the driver with the one from mariadb package
MariaDB - https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/connection-options.md#big-integer-support MySQL - https://github.com/mysqljs/mysql#connection-options Is it necessary to use mariadb driver there, because in knex.js website there is a text saying (if you decide you can close the issue - maybe it is nice to have these options in the documentation somewhere :) ) |
Interesting. Well the purpose of the Btw
I didn't really understand why is there the I will be doing some changes there in v4, basically narrowing it to strings for numeric/decimal types, as for example postgres will convert them to numbers by default, while mysql probably not. |
Closing as fixed in |
Stack trace / Logs
There is no need for delete query, becase only the company name is changed.
After doing some debugging i found that in the method diffEntities in Utils class arguments a and b has the following values:
Video property in the first object is of type number, but in the second is string.
I believe this is the source of the problem.
Expected behavior
Shouldn't apply any propagation on one-to-one relation when there are no modifications on it.
Versions
The text was updated successfully, but these errors were encountered: