UniqueResult<T>() or SingleOrDefault (for QueryOver) just to be 100% you
have just one result.

btw you will continue seeing that "warning" and you know that it is just a
warning, in your case.
If you don't want see it you have to add SetMaxResults(1) but then you will
see pagination stuff in your SQL and you know that it does not need it.

On Thu, Apr 28, 2011 at 2:54 PM, Joe Brockhaus <[email protected]>wrote:

> Hi, I've got a table that holds tickets with a primary key that the users
> never see, but a ticket number they do (and refer to on a regular basis).
>
> because this column value is unique (generated by sequence in a trigger on
> the table), I know there will only ever be a single result.
>
> How should I query for this in a way that does not result in 'unbounded
> result set' alert in NHProf, returns a single entity instance (like
> Get/Load), and is also performant?
> (my oracle table has an index on this column)
>
> thanks in advance.
>
> ------
> Joe Brockhaus
> [email protected]
> ------
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to