Repository navigation
Early adopter feedback before 1.0 #31
rey5137
announced in
Announcements
Replies: 1 comment
|
RFC for feedback: looking up a model's fields by name (rfc/0006) The use case is a search API where the client chooses the fields, for example The proposal is that each generated private static final FieldIndex<OrderView> API_FIELDS =
QOrderView.fields().only(List.of("id", "status", "customer", "customer.name"));
var resolved = API_FIELDS.resolve(requestedFields); // never throws; unknown names come back in resolved.unknown()
var query = QOrderView.query().select(resolved.select()).build(); // the customer join is added only when it's selectedIt only resolves names. Which fields to expose, how the response is shaped and how values are parsed stay in your code. I'd like opinions on these:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Model Query is 0.x: every public type is
@Incubatinguntil the 1.0 API freeze, so now is when your feedback can still change the API. Tell us:Bugs go to Issues; anything else goes here. Start with the comparison with JPA, Querydsl and Blaze-Persistence and the plain-JPA sample, which runs with one command:
All reactions