Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Open

DocumentId not implicitly defined when using annotations #2

dusura opened this issue Mar 23, 2012 · 2 comments

Comments

@dusura
Copy link

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.

@mathpere
Copy link
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
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants