0
我有一个映射,检索用户的所有活动角色。我使用where属性过滤出hbm映射中的角色。映射是这样的:NHibernate与getdate()sql函数在哪里属性
<map name="Bar" table="Foo_Bar" lazy="true" cascade="all" inverse="false" where="intGroupId Is Null And dtmExpires > getdate()">
<cache usage="read-write"/>
<key column="intUserId"/>
<index column="varRole" type="string"/>
<one-to-many class="Foo.Bar, Foo"/>
</map>
这个工作在生产SQL Server上伟大的,但在我使用SQLite的GETDATE()函数不承认我的单元测试。
如何修改我的映射,使其在MS SQL Server和SQLite中都可以使用,但仍然具有过滤器?
//约翰