Unclear documentation for Projectable.uniqueResult() #45

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

Comments

Projects
None yet
2 participants
@cowwoc
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 15, 2011

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@cowwoc

cowwoc Nov 15, 2011

Contributor

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)...?

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 15, 2011

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@cowwoc

cowwoc Nov 15, 2011

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 15, 2011

Member

Done

Member

timowest commented Nov 15, 2011

Done

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Nov 19, 2011

Member

Released in 2.2.5

Member

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