NHIbernate.JetDriver cuts off part of the SQL Command
Description
Hi,
encountered an error in the NHIbernate.JetDriver and don't know how to resolve it myself. I logged the SQL statement generated by the JetDriver for conneting to OLEDB (in my case FoxPro).
The line: items = session.CreateCriteria(typeof(T)).List();
Throws an exception saying "SQL: column VALIDAS not found". The line above leads in my case to the following SQL queries.
NHibernate: SELECT this_.OrganizationalUnitId as Organiza1_9_0_, this_.TypeId as TypeId9_0_ from OrganizationalUnit this_
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'employee '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'group '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'structuralUnit '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'role '
NHibernate: SELECT fkassignun0_.OrganizationalUnitId as Organiza5__1, fkassignun0_.AssignId as AssignId1_, fkassignun0_.AssignId as AssignId6_0_, fkassignun0_.Validas ValidFrom6_0_, fkassignun0_.ValidTo as ValidTo6_0_, fkassignun0_.StatusId as StatusId6_0_, fkassignun0_.OrganizationalUnitId as Organiza5_6_0_ FROM AssignUnitToStatus fkassignun0_ WHERE fkassignun0_.OrganizationalUnitId=?; Eine Ausnahme (erste Chance) des Typs "NHibernate.ADOException" ist in NHibernate.dll aufgetreten.
@p0 = '10'
Have a look in the last section: Instead of writing "fkassignun0_.ValidFrom as" it generates "fkassignun0_.Validas". For some reason it chops off the string "From ". The genric T in the above stated line is the entity OrganizationalUnit
It has some properties a many-to-one (Type) and two many-to-many (Status & Path) relationships. Attached you'll find the entites including the Assign-Entities of my many-to-many-Ralationship and a graphic with all entities.
The c#-Project works with any other database. Just the oledb-connection will not work. I set the priority very high because it "Block development and/or testing work, production could not run." I would really appreciate your help. If I cant get it to work I'm in deep trouble. Does anybody know where exactly (assembly) the error-throwing part is generated - is my guess "NHIbernate.JetDriver" right?
Hi,
encountered an error in the NHIbernate.JetDriver and don't know how to resolve it myself. I logged the SQL statement generated by the JetDriver for conneting to OLEDB (in my case FoxPro).
The line: items = session.CreateCriteria(typeof(T)).List();
Throws an exception saying "SQL: column VALIDAS not found". The line above leads in my case to the following SQL queries.
NHibernate: SELECT this_.OrganizationalUnitId as Organiza1_9_0_, this_.TypeId as TypeId9_0_ from OrganizationalUnit this_
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'employee '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'group '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'structuralUnit '
NHibernate: SELECT type0_.TypeId as TypeId16_0_, type0_.TypeName as TypeName16_0_, type0_.Icon as Icon16_0_, type0_.IsStructuralType as IsStruct4_16_0_, type0_.IsVisible as IsVisible16_0_, type0_.CanBeRootInHierarchy as CanBeRoo6_16_0_, type0_.IsEditable as IsEditable16_0_, type0_.SuperTypeId as SuperTyp8_16_0_ from Type type0_ WHERE type0_.TypeId=?; @p0 = 'role '
NHibernate: SELECT fkassignun0_.OrganizationalUnitId as Organiza5__1, fkassignun0_.AssignId as AssignId1_, fkassignun0_.AssignId as AssignId6_0_, fkassignun0_.Validas ValidFrom6_0_, fkassignun0_.ValidTo as ValidTo6_0_, fkassignun0_.StatusId as StatusId6_0_, fkassignun0_.OrganizationalUnitId as Organiza5_6_0_ FROM AssignUnitToStatus fkassignun0_ WHERE fkassignun0_.OrganizationalUnitId=?; Eine Ausnahme (erste Chance) des Typs "NHibernate.ADOException" ist in NHibernate.dll aufgetreten.
@p0 = '10'
Have a look in the last section: Instead of writing "fkassignun0_.ValidFrom as" it generates "fkassignun0_.Validas". For some reason it chops off the string "From ". The genric T in the above stated line is the entity OrganizationalUnit
It has some properties a many-to-one (Type) and two many-to-many (Status & Path) relationships. Attached you'll find the entites including the Assign-Entities of my many-to-many-Ralationship and a graphic with all entities.
The c#-Project works with any other database. Just the oledb-connection will not work. I set the priority very high because it "Block development and/or testing work, production could not run." I would really appreciate your help. If I cant get it to work I'm in deep trouble. Does anybody know where exactly (assembly) the error-throwing part is generated - is my guess "NHIbernate.JetDriver" right?
Thansk in advance for all your effort.
antoschka