hi
i have a VIEW. i am mapping an Nhibernate file to this view.
In the Nhibernate file i am writing HQL to query the VIEW. But i am getting errors like
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: No positional parameters in query: select memberNote from MemberNotes memberNote where (memberNote.Author = '?') or (memberNote.Author <> '?' and memberNote.Private = 'false').
this is my HQL
return session.CreateQuery("select memberNote from MemberNotes memberNote where (memberNote.Author = '?') or (memberNote.Author <> '?' and memberNote.Private = 'false')").SetString(0, loginUser).SetString(1, loginUser).List<MemberNotes>();
MemberNotes is the Entity class mapping to the View.
i didnt understand why i get the error.
Is it because i have no primary key in the view?
but in the hbm file i have given an id column class as native.
Can anybody help?
Thanks John
_________________ regards
John
|