Hey everyone I'm totally new to NHibernate and I'm working my way through the documentation and some tutorials. I want to use NHibernate in an application which uses an SQLite 3.6.1 database to store data. I think I got everything set up correctly and ran a unit test (using MbUnit) to retrieve a single record from a table and store it's data into a class using the ISession.Get<T>() function. But it always returned "null" so I used the "show_sql" property in the "hibernate.cfg.xml" to check the SQL query generated by NHibernate and it looks like this:
SELECT user0_.LogonId as LogonId0_0_, user0_.Name as Name0_0_, user0_.Password as Password0_0_, user0_.EmailAddress as EmailAdd4_0_0_, user0_.LastLogon as LastLogon0_0_ FROM users user0_ WHERE user0_.logon...@p0;@p0 = '1' I thought this would be fine (at least all the names are correct and the syntax looks ok as well) so I tried it in an SQLite administration tool and it complains about the named parameter @p0. I didn't find any specific information about SQLite (not) being able to interpret named parameters so I played around with the query and it really seems that SQLite can't interpret the part after the semicolon. What am I missing here to get this working? Is there an option to tell NHibernate not to use parameterized queries (although it normally increases performance)? Is this even an NHibernate issue or is it a problem in the System.Data.SQLite assembly (as sqlite3_bind() should be used to apply named parameters)? Thanks for your help. Cheers Montellese -- 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.
