All,
I have a situation here... I've updated the solution to NH 3 without running
all the persistance tests (my bad), and I've just now found that several of
them are broken.
The apparent reason is that NH is no longer repeating parameters when using
the same name twice in a DB that doesn't support named ones.
Example:
For the following query:
from User where StartDate <= :someDate and ActivationDate <= :someDate
The generated query is roughly (omitting aliases):
SELECT the, mapped, fields
FROM User
WHERE StartDate <= ? AND ActivationDate <= ?
NH 2.1.2 would add the value of the "someDate" parameter twice (although
I've seen cases where the parameters were in the wrong order).
NH 3.0.0 is adding it only once, causing a "Wrong number of parameters"
exception (DB is Informix).
My initial assessment is that the changes in commit 4944 related to NH-1981
broke this (which I'll try to prove by undoing that changeset and writing a
small proof-of-concept).
I'll open a proper JIRA when I get that but, could someone with more
experience in the codebase check if this is, effectively, a regression?
Richard, I'm particularly interested in your insight :-)
Thanks!
Diego