From: Paul S. (JIRA) <nh...@gm...> - 2011-04-12 12:50:06
|
NHibernate LINQ 3.0 connecting to Oracle ODP.Net Expression type 10005 is not supported by this SelectClauseVisitor. -------------------------------------------------------------------------------------------------------------------- Key: NH-2645 URL: http://216.121.112.228/browse/NH-2645 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.0.0.GA Reporter: Paul Speranza Priority: Critical I have the following LINQ query that is mapped to a view QueryResult<List<PersonDemographic>> members = new QueryResult<List<PersonDemographic>>(); var query = (from ms in this.Session.Query<MemberSummary>() where ms.NameSearch.StartsWith(firstName.ToUpper()) && ms.NameSearch2.StartsWith(lastName.ToUpper()) select new PersonDemographic { FirstName = ms.FirstName.ToProperCase(), LastName = ms.LastName.ToProperCase(), PersonId = ms.Id, Address = new Address { Line1 = ms.AddressLine1.ToProperCase(), Line2 = ms.AddressLine2.ToProperCase(), City = ms.City.ToProperCase(), State = ms.State, Zipcode = ms.Zipcode, }, PhoneNumber = new PhoneNumber { Number = string.IsNullOrWhiteSpace(ms.PhoneNumber) ? null : Regex.Replace(ms.PhoneNumber, @"(\d{3})(\d{3})(\d{4})", "$1-$2-$3") } }); if (this.Session.Transaction.IsActive) { members.Data = query.Distinct().Take(15).ToList(); } else { using (var transaction = this.Session.BeginTransaction()) { members.Data = query.Distinct().Take(15).ToList(); transaction.Commit(); } } The code is running under the transaction section. If I use it without a Distinct I have no problem. Adding the Distinct gives me an exception {"Expression type 10005 is not supported by this SelectClauseVisitor."} I can't find anything definitive. Can anyone help? Thanks, Paul -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |