What is the difference between UniqueResult() and SingleResult()?

3,533 views
Skip to first unread message

Peter Alexis

unread,
Jan 6, 2014, 6:46:47 AM1/6/14
to quer...@googlegroups.com
Hi,

Just wondering the difference between UniqueResult() and SingleResult()?

Rgds
Pet

Timo Westkämper

unread,
Jan 6, 2014, 9:58:29 AM1/6/14
to Querydsl on behalf of Peter Alexis
Hi.

They are mostly equivalent, but uniqueResult throws an Exception when more than one result row is returned. singleResult just returns the first and doesn't care whether multiple rows match.

Br,
Timo



--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Timo Westkämper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com


Reply all
Reply to author
Forward
0 new messages