eventsourcing/es4j

Problem: impossible to define indices in Scala

Open

#174 geöffnet am 29. Okt. 2016

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (27 Forks)batch import
help wanted

Repository-Metriken

Stars
 (406 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide