Not all view query methods are exposed in code first sdk
Closed this issue · 0 comments
aludwiko commented
For a view:
@Table("cfp_all")
@ViewId("cfp-view")
public class AllCallForPaperView extends View<CallForPaperView> {
....
@GetMapping("/cfps")
@Query("SELECT * as callForPaperViews FROM cfp_all ORDER BY deadlineInDays ASC")
public CallForPaperList getCallForPapers() {
return null;
}
@GetMapping("/open-cfps")
@Query("SELECT * as callForPaperViews FROM cfp_all WHERE deadlineInDays >= :nowEpochDays ORDER BY deadlineInDays ASC")
public CallForPaperList getOpenCallForPapers(@RequestParam long nowEpochDays) {
return null;
}
}
I see only:
INFO k.spring.impl.KalixSpringApplication - Registering View provider for [io.kalix.view.AllCallForPaperView]
16:32:11.312 INFO k.j.i.h.HttpEndpointMethodDefinition - Using configured HTTP API endpoint using [HttpRule(,Get(/cfps),,,Vector(),UnknownFieldSet(Map()))]
In the ViewDescriptorFactory
we process only the first query method:
val queryMethod: SyntheticRequestServiceMethod = annotatedQueryMethods.head