Hello,
I am using a recent version of the NHibernate trunk (r3941) and
greatly enjoying the benefits of typedef. However, it seems that
typedef definitions are not supported in the following scenario:
<typedef name="YesNoChar" class="Sample.Domain.Common.NHYesNoChar,
Sample.Domain.Nh" />
<sql-query name="Sample">
<return-scalar column="success" type="YesNoChar" />
DECLARE @success char(1)
EXECUTE dbo.SampleProc @sample_id = :sample_id, @success =
@success OUTPUT
SELECT @success AS success
</sql-query>
The above mapping results in the following exception trace:
NHibernate.MappingException : could not interpret type: YesNoChar
at
NHibernate.Cfg.XmlHbmBinding.ResultSetMappingBinder.CreateScalarReturn
(HbmReturnScalar returnScalarSchema)
at
NHibernate.Cfg.XmlHbmBinding.ResultSetMappingBinder.CreateQueryReturn
(Object item, Int32 count)
at NHibernate.Cfg.XmlHbmBinding.ResultSetMappingBinder.Create
(String name, Object[] items)
at NHibernate.Cfg.XmlHbmBinding.ResultSetMappingBinder.Create
(HbmSqlQuery sqlQuerySchema)
at
NHibernate.Cfg.XmlHbmBinding.NamedSQLQueryBinder.<>c__DisplayClass1.<AddSqlQuery>b__0
(IDictionary`2 )
at NHibernate.Cfg.Configuration.SecondPassCompile()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
Whereas this works:
<sql-query name="Sample">
<return-scalar column="success"
type="Sample.Domain.Common.NHYesNoChar, Sample.Domain.Nh" />
DECLARE @success char(1)
EXECUTE dbo.SampleProc @sample_id = :sample_id, @success =
@success OUTPUT
SELECT @success AS success
</sql-query>
Is this intended behaviour, because it seems rather inconsistent to
me?
Regards,
Gerke.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---