I'm fairly new to NHibernate and so I'm looking for some
recommendations or best practices.
In the following code after the GetNamedQuery is run the Query object
has two parameters ReturnAliases and ReturnTypes that have exception
values in them. This code comes from Codesmith's PLINQO templates.
Is there a recommended way to catch these types of exceptions and
bubble them up? I don't mind modifying the templates and regenerating
if I need to. But I'm looking for a recommended practice on these
types of things.
public IList<MSRP_EVENTSResult> MsrpEvent(System.String
scaseid)
{
IQuery query =
Advanced.DefaultSession.GetNamedQuery("MsrpEvent");
query.SetParameter("SCASEID", scaseid);
query.SetResultTransformer(
new
NHibernate.Transform.AliasToBeanConstructorResultTransformer(
typeof (MSRP_EVENTSResult).GetConstructors()[0]));
return query.List<MSRP_EVENTSResult>();
}
The ReturnAliase is : 'query.ReturnAliases' threw an exception of type
'System.NotSupportedException'
The ReturnTypes is : 'query.ReturnTypes' threw an exception of type
'System.NotSupportedException'
Thanks
dbl
--
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.