Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

DocumentId not implicitly defined when using annotations #2

Open
dusura opened this Issue Mar 23, 2012 · 2 comments

Comments

Projects
None yet
2 participants

dusura commented Mar 23, 2012

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.

Owner

mathpere commented Apr 2, 2012

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.

dusura commented Apr 2, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment