How to parse oracle hints /*+ materialize */ in Mybatis3?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to parse oracle hints /*+ materialize */ in Mybatis3?

chenglong liu

Hello,everybody:

When I use Mybatis to work, I meet a sql like this:

with catalog as (select /*+ materialize */ * from procurecatalog ) select * from catalog where catalog.id = 1

My XML is :

with catalog as (select <![CDATA[ /*+ materialize */]]> * from procurecatalog ) select * from catalog where catalog.id = 1

but in the program console show the Mybatis generate sql does not parse /*+ materialize */,

the console sql is:

with catalog as (select * from procurecatalog ) select * from catalog where catalog.id = 1

My question is how can I use /*+ materialize */ In Mybatis?

Thank you

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to parse oracle hints /*+ materialize */ in Mybatis3?

Kazuki Shimizu
Could you provide project that reproduce this issue on GitHub ?
I cannot reproduce on my sample application.

On Saturday, April 15, 2017 at 9:38:37 PM UTC+9, chenglong liu wrote:

Hello,everybody:

When I use Mybatis to work, I meet a sql like this:

with catalog as (select /*+ materialize */ * from procurecatalog ) select * from catalog where <a href="http://catalog.id" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcatalog.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHJ7X4qGBGLEZVIIV8R2Puhw85vFQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcatalog.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHJ7X4qGBGLEZVIIV8R2Puhw85vFQ&#39;;return true;">catalog.id = 1

My XML is :

with catalog as (select <![CDATA[ /*+ materialize */]]> * from procurecatalog ) select * from catalog where <a href="http://catalog.id" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcatalog.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHJ7X4qGBGLEZVIIV8R2Puhw85vFQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcatalog.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHJ7X4qGBGLEZVIIV8R2Puhw85vFQ&#39;;return true;">catalog.id = 1

but in the program console show the Mybatis generate sql does not parse /*+ materialize */,

the console sql is:

with catalog as (select * from procurecatalog ) select * from catalog where <a href="http://catalog.id" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcatalog.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHJ7X4qGBGLEZVIIV8R2Puhw85vFQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcatalog.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHJ7X4qGBGLEZVIIV8R2Puhw85vFQ&#39;;return true;">catalog.id = 1

My question is how can I use /*+ materialize */ In Mybatis?

Thank you

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.