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

FEATURE: DbJson Support for Dto-Queries #3143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rPraml
Copy link
Contributor

@rPraml rPraml commented Aug 8, 2023

You can use @DbJson data types in DTO-objects now

The DTO object

 public static class DtoJackson {
    @DbJson(length = 700)
    Set<BasicJacksonType<?>> valueSet = new LinkedHashSet<>();
    @DbJson(length = 500)
    BasicJacksonType<?> plainValue;
}

The query

DtoJackson dto = DB.find(EBasicJsonJackson2.class).setId(bean.getId())
      .select("valueSet,plainValue").asDto(DtoJackson.class).findOne();

rPraml added a commit to FOCONIS/ebean that referenced this pull request Aug 10, 2023
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.

1 participant