please, show your classes. and the query your want to execute. I don't
understand your problem.

2011/2/1 maumad <[email protected]>

> Commenting that out does not help either. Code is reduced just to 2 lines
> now:
>
> ActiveRecordContext.Instance.SessionFactory.OpenSession())
> {
>     var list = session.CreateCriteria<ModuleData>().List<ModuleData>();
> }
>
> Now my suspicion is on session object. How can I make sure it is correct?
>
> To verify, I tried: ?session.Get<CellId>(01010101)
>
> I get MappingException Unhandled. {"No persister for: Avi.Engine.CellId"}.
>
> But when I try to get the value by calling following code: I do get the
> CellId object back.
>
> CellId.FindOne(Expression.Eq("Id", 01010101));
>
> I do not have any xml mappings files. Is it necessary for session object to
> be created?
>
> Thanks for reading through all this. Your help is appreciated.
>
> --Am
>
>
> 2011/2/1 José F. Romaniello <[email protected]>
>
> I think you dont have to set the projection on the id.
>>
>>
>> 2011/2/1, maumad <[email protected]>:
>> > I am trying to get very simple query working. It does not throw but
>> > returns empty list. Here is the query:
>> >
>> >             using (var session =
>> > ActiveRecordContext.Instance.SessionFactory.OpenSession())
>> >             {
>> >                 var query1 = session.CreateCriteria<ModuleData>();
>> >                 query1.SetProjection(Projections.Property("Id"));
>> >                 query1.Add(Expression.Ge("Id", 0));
>> >                 var list = query1.List<ModuleData>();
>> >             }
>> >
>> > If I write HqlBasedQuery it works fine:
>> >
>> > var query = new HqlBasedQuery(typeof(ModuleData),
>> >                 QueryLanguage.Sql,
>> >                 @"SELECT Id
>> >                     FROM `aviprod`.`ModuleData`
>> >                     WHERE Id > '0'");
>> >
>> > Any pointers?
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Castle Project Users" group.
>> > To post to this group, send email to
>> [email protected].
>> > To unsubscribe from this group, send email to
>> > [email protected]<castle-project-users%[email protected]>
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/castle-project-users?hl=en.
>> >
>> >
>>
>> --
>> Enviado desde mi dispositivo móvil
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Castle Project Users" group.
>> To post to this group, send email to
>> [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<castle-project-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/castle-project-users?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to