Paging collection which uses Formula Properties with Filter parameters causes SQL syntax error

Description

I've got a class with a property definition such as:

<property name="CurrentJobTitle" type="System.String" formula="dbo.GetCurrentJobTitle(ContactID, :LanguageFilter.IsInitialised, :LanguageFilter.JobTitleTranslationTypeID, :LanguageFilter.LanguageID)" not-null="false" />

This works fine if not paging. However, if I attempt to page the results, I get the following exception:

Incorrect syntax near '('.
Incorrect syntax near 'page'.

If I enter:

<property name="CurrentJobTitle" type="System.String" formula="dbo.GetCurrentJobTitle(ContactID, 1, 2, 3)" not-null="false" />

i.e. not using Filter parameters, I can page without causing an exception or syntax error.

NHibernate 2.0.0 alpha 2
SQL Server 2005
.NET 3.5

Environment

None

Activity

Show:

Tuna Toksoz July 2, 2009 at 2:36 AM

User tested the issue and concluded that this issue has been solved in NH 2.1 Beta 2

Sukh July 1, 2009 at 4:17 AM

I can confirm that this is now fixed in 2.1 Beta 2.

Sukh June 8, 2009 at 3:36 AM

This was still an issue in 2.0.1 GA. I will test in on 2.1 over the coming week.

Fabio Maulo June 5, 2009 at 1:07 PM

Hi Sukh.
Do you have some new about this issue or we can close it ?

Fabio Maulo September 29, 2008 at 2:25 PM

NUnit Test case needed.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created June 23, 2008 at 8:57 AM
Updated July 2, 2009 at 2:36 AM
Resolved July 2, 2009 at 2:36 AM
Who's Looking?