#
mpw
Is there a way of getting NHibernate to return part of a class?
If you have a customer class mapped to the customer table and you want to get the ID and Surname for all customers, to produce a lookup list, but you don't need the rest of the table.
HQL - "Select s.ID, s.Surname from Customers s" produces an IList of ILists"
- I know you guys have more experience than me on NHibernate and I can't find an answer to this on their forums ;) - Pulling entire tables when you only want a subset of data seems rather inefficient. I can see several workarounds but they involve redesiging the data structure and/or the classes.
Thanks
Mark
If you have a customer class mapped to the customer table and you want to get the ID and Surname for all customers, to produce a lookup list, but you don't need the rest of the table.
HQL - "Select s.ID, s.Surname from Customers s" produces an IList of ILists"
- I know you guys have more experience than me on NHibernate and I can't find an answer to this on their forums ;) - Pulling entire tables when you only want a subset of data seems rather inefficient. I can see several workarounds but they involve redesiging the data structure and/or the classes.
Thanks
Mark