Skip to content
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

Json columns aren't converted on SQL Server #53

Open
MNGoldenEagle opened this issue Sep 20, 2018 · 0 comments
Open

Json columns aren't converted on SQL Server #53

MNGoldenEagle opened this issue Sep 20, 2018 · 0 comments

Comments

@MNGoldenEagle
Copy link

We're using bookshelf as an ORM solution between Postgres and SQL Server. Most of the functionality appears to be working, but I ran into a small hiccup with this plugin where it didn't perform JSON column conversions properly on SQL Server.

It looks like the issue has to do with how it's calculating parseOnFetch in the static block for the exported Bookshelf member. Currently it's only set if the client is SQLite, SQLite3, or MySQL. Adding a check for "mssql" leads to the desired behavior on SQL Server as well, though maybe it might make more sense to use client !== 'pg' instead, since only Postgres has a native JSON type?

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

No branches or pull requests

1 participant