开发者

does nhibernate3 have any problem with applyfilter

开发者 https://www.devze.com 2023-02-01 05:21 出处:网络
i\'ve just migrated from hibernate 2.1.2 to 3 now i have a problem in one of class maps i neede开发者_StackOverflow中文版da property to be conditional in this way:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消