Skip to content

Supporting SQL Function around inserting value in Criteria #268

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

Open
IvanKonevJr opened this issue Jan 4, 2020 · 2 comments
Open

Supporting SQL Function around inserting value in Criteria #268

IvanKonevJr opened this issue Jan 4, 2020 · 2 comments
Labels
for: external-project For an external project and not something we can fix status: blocked An issue that's blocked on an external project change

Comments

@IvanKonevJr
Copy link

IvanKonevJr commented Jan 4, 2020

We can use annotation to insert value in function:

data class Doc(
    @Id id: Long,
    english: String,
    @Fun("translate('french', english)") french: String
)

in annotation Fun("translate('french', ?)") we can select character "?" and get value from any primitive type of "french" field

then repository.save(doc) generate:

insert into doc(id,english,french) values(123, 'good day', translate('french', english))

this will greatly simplify the logic and source code.

@mp911de
Copy link
Member

mp911de commented Jan 9, 2020

Thanks for your suggestion. Spring Data R2DBC depends on Spring Data Relational that is hosted together with Spring Data JDBC. Can you file a ticket at https://jira.spring.io/ for DATAJDBC? We need to have such functionality in Spring Data Relational first.

@mp911de mp911de added for: external-project For an external project and not something we can fix status: blocked An issue that's blocked on an external project change labels Jan 9, 2020
@IvanKonevJr
Copy link
Author

Ok, is being discussed on https://jira.spring.io/browse/DATAJDBC-468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: blocked An issue that's blocked on an external project change
Projects
None yet
Development

No branches or pull requests

2 participants