I know HQL supports polymorphic queries. I'm not sure if the criteria API does.
hql example: http://www.nhforge.org/doc/nh/en/index.html#queryhql-polymorphism On Wed, Aug 18, 2010 at 4:38 AM, Henrique Cabral <hcab...@gmail.com> wrote: > Hi everyone, > > I have a scenario very much like this one: > http://wiki.fluentnhibernate.org/Auto_mapping#Ignoring_base-types > > I do have an abstract class, but there's a functionality in my > prototype that we may need. I wanna know if it's possible (out of the > box), to do something like: > > ICriteria criteria = session.CreateCriteria(typeof(Entity)); > var list = criteria.List<Entity>(); > > Where this would return a list with all instances of objects that > extend Entity. I currently use AutoMaps, table-per-subclass. > > Any thoughts? > > Cheers, > Henrique > > -- > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To post to this group, send email to fluent-nhibern...@googlegroups.com. > To unsubscribe from this group, send email to > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/fluent-nhibernate?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.