Invalid query when single filter is used to filter more than one entities (Oracle 11)

Description

I'm writing this from memory, not having the code in front of me so forgive me if details are sparse but here's the problem.

I recently tried to upgrade my application from NH 3.1 to 3.2 and I noticed many of the tests started to fail, due to the following problem.

We have a filter with a single parameter that is used to filter some some (1/3rd) of our entity types. NHibernate 3.1 used to generate query similar to following:

select * from entity1, entity2 where entity1.Something = 0, where entity2.Something = 1

both p0 and p1 have the same value of the filter's parameter.

NHibernate 3.2 does the following instead:

select * from entity1, entity2 where entity1.Something = 0, where entity2.Something = 0

notice in both cases just p0 is used, however NHibernate adds both parameters to the query.

As a result the Oracle 11 server we're using is throwing "ORA-01036: illegal variable name/number".

Hope that's clear enough

Environment

None

Activity

Julian Maughan 
July 17, 2011 at 2:38 AM

Duplicate of

Duplicate

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created July 17, 2011 at 2:22 AM
Updated July 8, 2015 at 4:45 AM
Resolved July 17, 2011 at 2:38 AM
Who's Looking?