Hello,

I have a quite simple HQL query

Session.CreateQuery("select cdt from ChildDataTable as ct " +
                        "where cdt.Parent1.Name = :parent1Name and
cdt.Parent2.Name = :parent2Name").
                        SetString("parent1Name", parent1Name).
                        SetString("parent2Name", parent2Name));

It worked correctly in NH 1.2.1 + JetDriver

In 2.0 version return I get this error below (I have simplified and
reformatted it to make it more readable)
Does anyone know how to fix it or change the query or what has changed
on the way to NH 2.0?

Regards,
Andrzej [severian]

--------------------------------------------------------------------------------------------------------------------------
MyTestLibrary.TestAccess : NHibernate.ADOException : could not execute
query

[ select cdt0_.RID as RID19_, cdt0_.PARENT1_RID as RM2_19_,
cdt0_.PARENT2_RID as RM3_19_, cdt0_.VALUE as VALUE19_
from CHILD_DATA_TABLE cdt0_, PARENT1_TABLE parent1_, PARENT2_TABLE
parent2_
where (parent1_.NAME=?  and cdt0_.PARENT1_RID=parent1_.RID)and
(parent2_.NAME=?  and cdt0_.PARENT2_RID=parent2_.RID) ]

  Name:parent1Name - Value:Test Parent 1 Name Name:parent2Name -
Value:Test Parent 2 Name

[SQL: select cdt0_.RID as RID19_, cdt0_.PARENT1_RID as RM2_19_,
cdt0_.PARENT2_RID as RM3_19_, cdt0_.VALUE as VALUE19_
from CHILD_DATA_TABLE cdt0_, PARENT1_TABLE parent1_, PARENT2_TABLE
parent2_
where (parent1_.NAME=?  and cdt0_.PARENT1_RID=parent1_.RID)and
(parent2_.NAME=?  and cdt0_.PARENT2_RID=parent2_.RID)]

  ----> System.Data.OleDb.OleDbException : The SELECT statement
includes a reserved word or an argument name that is misspelled or
missing, or the punctuation is incorrect.

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