CreateSqlString and us H-SQL (note H-SQL is not equal to HQL)
On Fri, Aug 20, 2010 at 12:05 PM, Mike <[email protected]> wrote:
> I created a custom dialect and told NH to use it. From there I
> registered a few keywords so I could use it with HQL.
>
> public class CustomDialect : Oracle10gDialect
> {
> public CustomDialect()
> {
> RegisterKeyword("start");
> RegisterKeyword("with");
> RegisterKeyword("connect");
> RegisterKeyword("by");
> RegisterKeyword("prior");
> }
> }
>
> Here is the function in my repository responsible for using those
> keywords.
>
> public static IList<string> FindAll()
> {
> ISession sesion = GetSession();
>
> var q = sesion.CreateQuery(@"select nu.StationDesc from
> NormalUpstream nu
> start with nu.UpStationNumber = 'abc'
> connect by prior StationNumber =
> nu.UpStationNumber");
>
> return q.List<string>();
> }
>
> That HQL only generated `select nu.StationDesc from NormalUpstream
> nu`.From that HQL, I would expect the SQL generated would include my
> new keywords.
>
> Why is NH ignoring my registered keywords?
>
> Thank you.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
--
Fabio Maulo
--
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.