What is your mapping for Patient and Name ? Thanks, Jason
On Mon, Jun 14, 2010 at 12:04 AM, reggieboy <[email protected]>wrote: > Hello guys im trying to hydrate a DTO using projections in NHibernate > this is my code > > > IList<PatientListViewModel> list = > > y.CreateCriteria<Patient>() > > .SetProjection(Projections.ProjectionList() > > .Add(Projections.Property("Birthdate"), > "Birthdate") > > .Add(Projections.Property("Doctor.Id"), > "DoctorId") > > .Add(Projections.Property("Gender"), > "Gender") > .Add(Projections.Property("Id"), > "PatientId") > > .Add(Projections.Property("Patient.Name.Fullname"), > "Fullname") > ) > > .SetResultTransformer(Transformers.AliasToBean<PatientListViewModel>()) > .List<PatientListViewModel>(); > > > But this is throwing and exception, what do you think seems to be the > problem? is this a limitation of the CRITERIA API? > > here is the error message > > Message: could not resolve property: Patient.Name.Fullname of: > OneCare.Domain.Entities.Patient > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- 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.
