for example: execute the code : session.CreateSQLQuery("select CONVERT('2022-07-01 11:11:11',datetime) cd ").List()
then will throw error: could not execute query [ select CONVERT('2022-07-01 11:11:11',datetime) cd ] [SQL: select CONVERT('2022-07-01 11:11:11',datetime) cd] 在 NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters, IResultTransformer forcedResultTransformer, QueryCacheResultBuilder queryCacheResultBuilder) 在 NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) 在 NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) 在 NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces) 在 NHibernate.Loader.Custom.CustomLoader.List(ISessionImplementor session, QueryParameters queryParameters) 在 NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) 在 NHibernate.Impl.AbstractSessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) 在 NHibernate.Impl.AbstractSessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters) 在 NHibernate.Impl.SqlQueryImpl.List() only datetime is error,other such as char is success session.CreateSQLQuery("select CONVERT('2022-07-01 11:11:11',char) cd ").List() -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nhusers/211ec193-597d-4890-b7ec-6d36f13704dfn%40googlegroups.com.