Well, you need to have projections in your query to tell it what to return.

/Oskar

2012/8/23 Vishal <[email protected]>

> even UniqueResult would be of type "EmployeeUploadIntegrationRun" ..I want
> to return a boolean value only. Also there could be multiple entries for a
> fileconfigurationid in that case UniqueResult will fail.
>
> Please correct me if I am wrong.
>
> Regards
> Vishal
>
> On Thursday, August 23, 2012 2:56:36 PM UTC+1, Oskar Berggren wrote:
>>
>> UniqueResult()
>>
>> /Oskar
>>
>> 2012/8/23 Vishal <[email protected]>
>>
>>>  I have a scenario where I need to return a boolean value from the
>>> database if the Id exists.
>>> Below is my current query :
>>>
>>> session.CreateCriteria(typeof (EmployeeUploadIntegrationRun)**)
>>>                 .Add<**EmployeeUploadIntegrationRun>(**c =>
>>> c.FileConfiguration.Id == fileConfigurationId)
>>>                 .List<**EmployeeUploadIntegrationRun>(**);
>>>
>>> Instead of an it returning a list , I want it to just return a boolean
>>> value based on the fileConfigurationId.
>>>
>>> Any ideas about that.
>>>
>>> Thanks in advance.
>>> Regards
>>> Vishal.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "nhusers" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/nhusers/-/HuSmQJ1TQjAJ<https://groups.google.com/d/msg/nhusers/-/HuSmQJ1TQjAJ>
>>> .
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to nhusers+u...@**
>>> googlegroups.com.
>>>
>>> For more options, visit this group at http://groups.google.com/**
>>> group/nhusers?hl=en <http://groups.google.com/group/nhusers?hl=en>.
>>>
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nhusers/-/bKvMs9c_nq8J.
>
> 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.
>

-- 
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