I was wondering the same question a while ago. IIRC, the reason why an exception isn't thrown in this case is nh's ability for polymorphistic queries. In your case, it does not have to be a Cat you get back but a DomesticCat or whatever. In other words - just because your prop doesn't exist in the type you create the criteria for, it can exists in sub types.
________________________________ Från: [email protected] [[email protected]] för Germán Schuager [[email protected]] Skickat: den 5 mars 2009 22:46 Till: [email protected] Ämne: [nhusers] SetFetchMode allows non-existent property Hi, given this code: session.CreateCriteria(typeof (Cat)) .SetFetchMode("nonExistentAssociation", FetchMode.Eager) .List<Cat>(); where the class Cat doesn't have any property named nonExistentAssociation, I was expecting that NH throws an exception pointing that "nonExistentAssociation" is not a valid association path, but it does not. Is this ok? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
