I am creating a new NHibernate dialect to work with an OpenEdge 10.2a
database over ODBC. I have been using the dialect in NHibernate 2.1
with no problems, but when porting it to NHibernate 3.3.1 I'm having
problems with the generated querys Like statement.
When using the dialect on NHibernate 3.3.1, like statements are
generated like below for a linq query using startswith("sometest").
select test from tests
where testname like (?||'%');
p0 = 'sometest' [Type: String (8)]
This has changed since NHibernate 2.1, and the OpenEdge database does
not support this. The same query in NHibernate 2.1 looks like:
select test from tests
where testname like ?;
p0 = 'sometest%'
I have tried using the MsSql2005Dialect, and this changes the
generated SQL a little to:
select test from tests
where testname like (?+'%');
p0 = 'sometest' [Type: String (8)]
Notice the pipes that became a plus.
What causes these changes, and how can I affect it so I can can make
my dialect work on NH 3.3.1?
I would like to generate the statement like before, or using a concat
function to join the parameter with the percent character.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.