DocumentId not implicitly defined when using annotations
To get annotations to work you have to explicitly define an id field in your domain class and annotate it with @DocumentId. Otherwise you get a SearchException "No document id".
It would be nice if this wasn't necessary.
Also, the documentation implies that the explicit id is not necessary. This is not so.
I am aware of this problem. This is one reason why the plugin provides a declarative DSL for defining indexed fields within domain classes
static search = { ... }
I totally forgot to report it in the documentation, I'll fix this.
I don't have yet any solution to omit DocumentId, I let the bug open.
Hi Mathieu,
thanks for your reply. I switched from declarative DSL to annotations recently. I had some problems with the DSL and class hierarchies though I can remember the exact issue. So I think annotations is the only option for me at the moment.