Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql文件中强制索引被当成普通注释解析 #442

Closed
realcbb opened this issue Apr 23, 2013 · 3 comments
Closed

sql文件中强制索引被当成普通注释解析 #442

realcbb opened this issue Apr 23, 2013 · 3 comments
Assignees
Milestone

Comments

@realcbb
Copy link

realcbb commented Apr 23, 2013

当sql中有强制索引select /+index(a,idx)/ * from a时,日志中打印的sql会将/+index(a,idx)/部分去除。

@wendal
Copy link
Member

wendal commented Apr 23, 2013

上java代码

@realcbb
Copy link
Author

realcbb commented Apr 23, 2013

JAVA
NutDao dao = new NutDao(ds);
FileSqlManager sqlManager = new FileSqlManager("all.sql");
Sql sql = sqlManager.create("test");
sql.setCallback(Sqls.callback.entities());
sql.setEntity(dao.getEntity(NetType.class));
dao.execute(sql);
System.err.println(sql.getList(NetType.class));

all.sql
/test/
select /+index(a,idx)/ * from a

日中中打印出来就是 select * from a
另外Dao和Sql两者分工看上去有点模糊,不过还没看源码哈。。

@wendal
Copy link
Member

wendal commented Jul 29, 2015

新的NutSql已经重写并兼容了

@wendal wendal closed this as completed Jul 29, 2015
@wendal wendal self-assigned this Jul 29, 2015
@wendal wendal added this to the 1.b.53 milestone Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants