Skip to content

Conversation

@Helveg
Copy link
Collaborator

@Helveg Helveg commented Mar 20, 2025

Problem

The condition !Number.isNaN(value) was always true, causing all JSONB column queries to be coerced into Number(value), which resulted in NaN.

Solution

Updated the check to !Number.isNaN(Number(value)) to ensure that the numeric conversion is properly validated before use.

Additionally, I also added the json column type as a valid JSON column type. Both jsonb and json seem to work just fine for JSON operations in TypeORM :)

@Helveg Helveg requested a review from ppetzold March 20, 2025 14:56
@vsamofal
Copy link
Collaborator

maybe we can add few tests for that?

@Helveg
Copy link
Collaborator Author

Helveg commented Mar 21, 2025

I'll add a couple of tests!

@xShazzy
Copy link

xShazzy commented Jun 16, 2025

Any eta when it will be merged?

@Helveg
Copy link
Collaborator Author

Helveg commented Jun 24, 2025

@xShazzy the only thing lacking is tests, it would help a lot if perhaps you'd have time to contribute those?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants