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

Unclear documentation for Projectable.uniqueResult() #45

Closed
cowwoc opened this issue Nov 12, 2011 · 6 comments
Closed

Unclear documentation for Projectable.uniqueResult() #45

cowwoc opened this issue Nov 12, 2011 · 6 comments

Comments

@cowwoc
Copy link
Contributor

@cowwoc cowwoc commented Nov 12, 2011

The Javadoc reads: "There is some ambiguity for missing results and null valued results, " ... so far so good. It then continues: "for disambiguation and your own projection methods." This part of the sentence makes no sense. What are we supposed to do for disambiguation?

timowest added a commit that referenced this issue Nov 15, 2011
@timowest
Copy link
Member

@timowest timowest commented Nov 15, 2011

Thanks for the bug report. It should have been :
"There is some ambiguity for missing results and null valued results, for disambiguation use your own projection methods"

Is this clear enough? Feel free to suggest alternatives.

@cowwoc
Copy link
Contributor Author

@cowwoc cowwoc commented Nov 15, 2011

Now it's proper English but I don't actually understand what "use your own project methods" means :) Perhaps include a short code sniplet or at the very least {@link} to the relevant method(s)...?

@timowest
Copy link
Member

@timowest timowest commented Nov 15, 2011

Maybe mentioning the ambiguity is enough? I meant to subclass queries and use custom methods, but I'm not sure anymore if this is really good advice.

@cowwoc
Copy link
Contributor Author

@cowwoc cowwoc commented Nov 15, 2011

I'd recommend using list() as a workaround. It's guaranteed to return an empty list if there are no results and a list containing null if there are results.

timowest added a commit that referenced this issue Nov 15, 2011
@timowest
Copy link
Member

@timowest timowest commented Nov 15, 2011

Done

@timowest
Copy link
Member

@timowest timowest commented Nov 19, 2011

Released in 2.2.5

@timowest timowest closed this Nov 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants