My Microsoft SQL Server 2005 database contains a table that has an XML field that has some important metadata, and under normal SQL I could run the following query and get a list of items which don't have UPC codes set... Unfortunately I'm having a hard time re-creating this query using NHibernate's Criteria API:
SELECT [Id],[meta].value( '(/meta/upc)[1]', 'nvarchar(max)') as upc
FROM
[mediaContent].[dbo].[audioVideo]
WHERE
[meta].value( '(/meta/upc)[1]', 'nvarchar(max)') != ''
Any suggestions?