Well, in answering my own question, indeed it appears the MsSql2008Dialect does not support the "sql_variant" data type. I've modified a local version of the 2.1.x branch, and along with the SqlVariant IUserType posted in the hibernate.org thread, it seems to work fine. Here is a patch describing my changes in case anyone is interested:
Index: MsSql2008Dialect.cs =================================================================== --- MsSql2008Dialect.cs (revision 4919) +++ MsSql2008Dialect.cs (working copy) @@ -10,7 +10,8 @@ RegisterColumnType(DbType.DateTime2, "DATETIME2"); RegisterColumnType(DbType.DateTimeOffset, "DATETIMEOFFSET"); RegisterColumnType(DbType.Date, "DATE"); - RegisterColumnType(DbType.Time, "TIME"); + RegisterColumnType(DbType.Object, "SQL_VARIANT"); + RegisterColumnType(DbType.Time, "TIME"); RegisterFunction("current_timestamp", new NoArgSQLFunction ("sysdatetime", NHibernateUtil.DateTime2, true)); RegisterFunction("current_timestamp_offset", new NoArgSQLFunction ("sysdatetimeoffset", NHibernateUtil.DateTimeOffset, true)); Ayende and/or Fabio: Any interest in putting this into the trunk for a future release? Regards, -devon On Jan 18, 10:01 am, devonl <devon.laza...@gmail.com> wrote: > [ s n i p ] > > Looking at the code in NHibernate.Dialect.MsSql2008Dialect and > NHibernate.Dialect.MsSql2005Dialect, sure enough, it looks like > DbType.Object is not configured. > > Does NH support the use of DbType.Object? I'm thinking I must be > missing something.
-- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.