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 support? [DATAJDBC-284] #509

Open
spring-projects-issues opened this issue Oct 30, 2018 · 7 comments
Open

Json support? [DATAJDBC-284] #509

spring-projects-issues opened this issue Oct 30, 2018 · 7 comments
Assignees
Labels
in: mapping Mapping and conversion infrastructure type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

srinivas kvs opened DATAJDBC-284 and commented

Add an attribute to @Embed introduced in DATAJDBC-111 so that the annotated property gets stored as JSON instead of multiple embedded columns.

The attribute should not be boolean but an enum since we might want to support other formats in the future, e.g. XML


1 votes, 4 watchers

@spring-projects-issues
Copy link
Author

Jens Schauder commented

I'm currently not sure how such support would look like. Could you be a little more specific what you would like to see?

@spring-projects-issues
Copy link
Author

srinivas kvs commented

Think if we could somehow define a ColumnType to mark it as Json Type, then behind the scene when you are actually generating the insert/ update statement to map the values to columns you could do something like   

cast(:additionalParams as JSON)

 

This is probably very postgres syntax 

@spring-projects-issues
Copy link
Author

Jens Schauder commented

So if we frame the goal Postgres independently you are looking for for a way to make generated SQL dependent on the "type" of the attribute that represents that column in the object model. "Type" being used in a very broad sense here.

This does sound useful, but also very specialized. I'll leave the issue open but to be honest it is well down on the priorities list

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: mapping Mapping and conversion infrastructure labels Dec 31, 2020
@holmofy
Copy link

holmofy commented Aug 17, 2021

When will this feature be released? I can't wait 😃

@mcekovic
Copy link

Almost all of the today's RDBMS have JSON datatype, it should be possible to make it RDBMS independent (or at least converters could be implemented for different RDBMSes).

@holmofy
Copy link

holmofy commented Aug 18, 2023

Five years have passed

@vnobo
Copy link

vnobo commented Nov 24, 2023

It should be the easiest to add JSON function to Criteria API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: mapping Mapping and conversion infrastructure type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants