I am experiencing a strange issue.
I have a stored procedure that returns an xml record from a SQL Server DB.
It's something like this:
SELECT id, name, email
> FROM employees
> FOR XML PATH
I fetch the result in this way:
var constructor = typeof(XmlMapper).GetConstructor(new[] { typeof(string) });
var query = session.GetNamedQuery("GetEmployees")
.SetResultTransformer(Transformers.AliasToBeanConstructor(constructor))
.UniqueResult<XmlMapper>();
But when I run the test I get an error, because the result is not unique. I
checked what's going on: the single xml field returning is split in chunks
of 2033 chars.
Here the hbm code:
<!-- Employees --> <sql-query name="GetEmployeesXml"> EXEC
proc_get_employees </sql-query>
Any idea? Thanks
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/ule6jf-r-OIJ.
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.