I have discussed the problem with Steve and we know where it is. We have to add some information during the tree visit because, at the moment, we have no info about a value and its usage inside an expression. Where(x=> x.PropertyCustom == aValue) We have to know if "PropertyCustom" is mapped using a UserType...
Well... it will take a while. On Wed, Jul 28, 2010 at 9:46 AM, James Crowley <[email protected]>wrote: > thanks Fabio - hadn't spotted it before because I was searching > on ICompositeUserType instead. > > > On 28 July 2010 13:43, Fabio Maulo <[email protected]> wrote: > >> We already have an issue about IUserType and LINQ provider. >> >> >> On Wed, Jul 28, 2010 at 8:57 AM, James Crowley >> <[email protected]>wrote: >> >>> Hi guys, >>> >>> I've got three unit tests, using Criteria, QueryOver and Linq >>> respectively (see below) - the first two passes fine, but the last one fails >>> with a "No persister for: System.Uri" error. >>> >>> The mapping on the column is: >>> >>> <property name="WebSite" >>> type="NHibernate.Test.NHSpecificTest._Test.UriUserType, NHibernate.Test"> >>> <column name="WebSite"/> >>> </property> >>> >>> Has anyone else seen this before? Should I raise a JIRA for this? Thanks! >>> >>> [Test] >>> public void CanAddRestrictionsUsingCriteria() >>> { >>> using (ISession session = OpenSession()) >>> { >>> session.CreateCriteria<Customer>() >>> .Add(Restrictions.IsNotNull("WebSite")) >>> .List(); >>> } >>> } >>> >>> [Test] >>> public void CanAddRestrictionsUsingQueryOver() >>> { >>> using (ISession session = OpenSession()) >>> { >>> session.QueryOver<Customer>() >>> .Where(t => t.WebSite != null) >>> .List(); >>> } >>> } >>> >>> [Test] >>> public void CanAddRestrictionsUsingLinq() >>> { >>> using (ISession session = OpenSession()) >>> { >>> new NhQueryable<Customer>(session).Where(t => t.WebSite != >>> null).ToList(); >>> } >>> } >>> >>> >> >> >> -- >> Fabio Maulo >> >> > > -- Fabio Maulo
