GeneratorDemo使用报错

Exception in thread "main" java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: '`' 附近有语法错误。

at com.jfinal.plugin.activerecord.generator.MetaBuilder.build(MetaBuilder.java:102)

at com.jfinal.plugin.activerecord.generator.Generator.generate(Generator.java:210)

at com.demo.common.model.GeneratorDemo.main(GeneratorDemo.java:51

数据库能正确连接

评论区

JFinal

2016-10-21 11:17

sql server 数据库需要设置方言: generator.setDialect(new SqlServerDialect()); 默认方言是 MySqlDialect

homehappy

2016-10-21 11:20

@JFinal 对哦,没仔细看

homehappy

2016-10-21 15:07

@homehappy http://www.oschina.net/question/2276614_2147333,关于连接sqlserver2008的问题,“原因找到了,其实不需要设置flag,只需要把架构名加上就好了,sqlserver默认为dbo”这个是什么意思?求解

热门反馈

扫码入社