Cette requête fonctionne très bien:Castle ActiveRecord ne parvient pas à détecter champ DAO dans certaines requêtes
DetachedCriteria filter = DetachedCriteria
.For(typeof(NotificationRecord), "nr")
.Add(Expression.Eq("nr.Submission.Id", 5));
return ActiveRecordMediator<NotificationRecord>.FindAll(filter);
Cette requête échoue avec le message d'exception: could not resolve property: Submission.IsScheduledForNotification of: NotificationRecord
DetachedCriteria filter = DetachedCriteria
.For(typeof(NotificationRecord), "nr")
.Add(Expression.Eq("nr.Submission.IsScheduledForNotification", true));
return ActiveRecordMediator<NotificationRecord>.FindAll(filter);
Pour assurer ActiveRecord reconnaît IsScheduledForNotification
, je une simple requête sur l'objet réel Submission
en utilisant le IsScheduledForNotification
comme filtre comme ça et cela fonctionne
ActiveRecordMediator<Submission>.Exists(Expression.Eq("IsScheduledForNotification", true));
Quelqu'un peut-il dire pourquoi cela devrait se produire?