Steve, the exception was about missed parameters values (pagination
parameters missed).
I'll re-install oracle and check it.
--
Fabio Maulo
El 06/07/2010, a las 05:29, Steve Strong escribió:
I think there are actually two separate issues here. Single() &
SingleOrDefault() work correctly if th
I think there are actually two separate issues here. Single() &
SingleOrDefault() work correctly if there are zero or one results; they are
incorrect if there is more than one result (due to a buggy use of
SetMaxResults(1), which I'll fix). But that's not the bug that's being seen
here.
What And
Sir Steve Strong knows it, don't worry.
On Mon, Jul 5, 2010 at 3:39 PM, Diego Mijelshon wrote:
> It's not necessarily a bug in the code.
> An exception is just that: a state that deviates from the rule.
> While the code shouldn't be designed around exceptions, it can happen that,
> given a spec o
It's not necessarily a bug in the code.
An exception is just that: a state that deviates from the rule.
While the code shouldn't be designed around exceptions, it can happen that,
given a spec of "there can be one and only one X where Y=Z" you try to
retrieve it using Single and, somehow (say, beca
If you write a query that may return 10 records and there you put "Single"
you are foo or you have a bug.
That is what "Single" mean and for that reason it throw exception when more
than one instance are selected.
In NH we don't have to change its meaning putting an unnecessary pagination
(SetMaxR
I can't think of a better way to do it.
For Single, this is the behavior:
- Request at most 2 records from the server (to avoid doing extra work)
- If no records returned, exception
- If one record returned, map it and we're done
- If more than one record returned, exception
For SingleOrDefault i
There is no need to complicate the query for "Single"
--
Fabio Maulo
El 05/07/2010, a las 12:16, Diego Mijelshon
escribió:
IIRC, Single/SingleOrDefault use SetMaxResults(2), and then checks that a
single record is returned...
Diego
On Mon, Jul 5, 2010 at 10:19, Fabio Maulo wrote:
> For
It happenin provider. You can execute the linq first and then apply Single
> var query = (from a in session.Query()
> where a.Username == username
> select a).ToList();
> var user = query.Single();
--
Fabio Maulo
El 05/07/2010, a las 12:
How do I use the SetMaxResults in the case ? Or is that something the
happens somewhere in the linq provider ?
public OlaUser GetByUsername(string username)
{
var session = GetSession();
var query = (from a in session.Query()
w
IIRC, Single/SingleOrDefault use SetMaxResults(2), and then checks that a
single record is returned...
Diego
On Mon, Jul 5, 2010 at 10:19, Fabio Maulo wrote:
> For "First" and "FirstOrDefault" we can apply SetMaxResults(1) ... and fix
> the bug (please check last JIRAs and add a new one if
about the different behavior of each NH's query system well... it is
normal...
Different systems, different implementations, different results
On Mon, Jul 5, 2010 at 10:19 AM, Fabio Maulo wrote:
> For "First" and "FirstOrDefault" we can apply SetMaxResults(1) ... and fix
> the bug (please ch
For "First" and "FirstOrDefault" we can apply SetMaxResults(1) ... and fix
the bug (please check last JIRAs and add a new one if you can't find an
existing)
For "Single" and "SingleOrDefault" we *shouldn't* apply SetMaxResults(1)
because doing so we will change the "Single" behavior (it should thr
Hi Fabio,
What do you mean by changing the meaning of Single ?
Oh and It also happens with First(), and SingleOrDefault() as well
It seems to be something to do with this call
bool useLimit = UseLimit(selection, dialect);
when I use Query<> it returns true, and if I use QueryOver<> it return
fa
Confirmed, we have a bug.
We are changing the meaning of Single.
On Mon, Jul 5, 2010 at 8:35 AM, Fabio Maulo wrote:
> If our provider creates a paginated query for the method "Single" we have a
> bug.
>
>
> On Mon, Jul 5, 2010 at 8:06 AM, andrew6072
> wrote:
>
>> Hi Fabio,
>>
>> I think the exc
If our provider creates a paginated query for the method "Single" we have a
bug.
On Mon, Jul 5, 2010 at 8:06 AM, andrew6072 wrote:
> Hi Fabio,
>
> I think the exception got chopped off, this is the full exception.
>
> [SQL: select * from ( select olauser0_.USER_ID as USER1_57_,
> olauser0_.USERNA
Hi Fabio,
I think the exception got chopped off, this is the full exception.
[SQL: select * from ( select olauser0_.USER_ID as USER1_57_,
olauser0_.USERNAME as USERNAME57_, olauser0_.EMAIL_ADDRESS as
EMAIL3_57_, olauser0_.COMMENTS as COMMENTS57_, olauser0_.PASSWORD as
PASSWORD57_, olauser0_.PASSW
16 matches
Mail list logo