eventsourcing/es4j

Problem: impossible to define indices in Scala

Open

#174 opened on 2016年10月29日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)Java (27 forks)batch import
help wanted

Repository metrics

Stars
 (406 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

According to a report by @bsrk, and subsequent verification, Scala does not support static fields in classes. It does have companion objects, however, since Scala does not consider it a class and it is therefore impossible to specify it in the @Indices(Array(MyEventIndices)) annotation.

Proposed solution: implement a ScalaObjectIndexLoader that will use Scala's own reflection, but other ideas are welcome.

Temporary workaround (for those who need one): write your index definitions in separate Java classes and refer to them in @Indices(...) annotations.

コントリビューターガイド