mybatis / mybatis-3

MyBatis SQL mapper framework for Java
http://mybatis.github.io/mybatis-3/
Apache License 2.0
19.8k stars 12.86k forks source link

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

Closed ManaStuDent closed 7 years ago

ManaStuDent commented 7 years ago

Hello, the author: 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: 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?

LiuChenglong comes from China Forgive my poor English Thank you

harawata commented 7 years ago

Hi,

I know there was a user who successfully used Oracle hints with MyBatis. So, if the comment is removed in the process, it is not MyBatis. Try enabling debug log and you will see the actual SQL that MyBatis executes.

We use GitHub Issues only to track bugs and feature requests. Please post your question to the mailing list. Thank you!