Skip to content

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
@rPraml rPraml force-pushed the db-json-support-for-dto branch from 2800a58 to c750611 Compare October 7, 2024 13:09
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