I'm not an expert in Fluent NH, but it seems to me that your person map should look like this:
class PersonMap : ClassMap<Person>
{
public PersonMap()
{
Id(c => c.ID).GeneratedBy.Identity();
//this works fine
HasMany(c => c.Pets);
//this dosen't work, because the result contains dogs and cats
//how can I tell NHibernate to only fetch dogs or cats?
HasMany<Cat>(c => c.Cats);
HasMany<Dog>(c => c.Dogs);
}
}
Because you're Person has a Dogs property which is an IList not IList, and conversely the same for Cats.
Joseph
2009-11-12 18:04:25