Skip to content

Add support for MSSQL JSON data #1339

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

Closed
alxxyz opened this issue Sep 26, 2022 · 1 comment
Closed

Add support for MSSQL JSON data #1339

alxxyz opened this issue Sep 26, 2022 · 1 comment
Labels
in: r2dbc Spring Data R2DBC status: duplicate A duplicate of another issue

Comments

@alxxyz
Copy link

alxxyz commented Sep 26, 2022

MSSQL supports JSON data
https://learn.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?view=sql-server-ver16

db schema

CREATE TABLE companies (
                id bigint IDENTITY PRIMARY KEY,
                partners nvarchar(4000) CHECK(
                    ISJSON(partners) = 1
                )
)

When I try to use a json(array) field

class Company {

    private List<Long> partners;
}

I get the error

org.springframework.dao.InvalidDataAccessResourceUsageException: Dialect org.springframework.data.r2dbc.dialect.SqlServerDialect does not support array columns
	at org.springframework.data.r2dbc.core.DefaultReactiveDataAccessStrategy.getArrayValue(DefaultReactiveDataAccessStrategy.java:245) ~[spring-data-r2dbc-1.5.2.jar:1.5.2]
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 26, 2022
@mp911de mp911de transferred this issue from spring-projects/spring-data-r2dbc Sep 26, 2022
@schauder schauder added the in: r2dbc Spring Data R2DBC label Sep 26, 2022
@schauder
Copy link
Contributor

Is this a duplicate of #509 or should we keep this for support in R2DBC vs JDBC in #509?

@gregturn gregturn added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: r2dbc Spring Data R2DBC status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants