does nhibernate3 have any problem with applyfilter
i've just migrated from hibernate 2.1.2 to 3 now i have a problem in one of class maps i neede开发者_StackOverflow中文版d a property to be conditional in this way:
public class ActivePartyConditionFilter : FilterDefinition
{
public ActivePartyConditionFilter()
{
WithName("ActivePartyConditionFilter")
.AddParameter("condition", NHibernate.NHibernateUtil.Int32);
}
}
public class PartyMap : ClassMap<Party>
{
Schema("organizationstructure");
Id(p => p.Id);
Map(p => p.IsApproved)
.Not.Nullable();
Map(p => p.IsActive)
.Not.Nullable();
ApplyFilter<ActivePartyConditionFilter>("IsActive = :condition");
}
i didnt have any problem with this in previous version, but in this version the line
ApplyFilter<ActivePartyConditionFilter>("IsActive = :condition");
would make an unusable join when it wanna execute the query
It has some problems. Search for filter on Jira. I cannot see from your code if any of them is causing the problem you try to describe.
精彩评论