braisdom / ObjectiveSql

Writing SQL using Java syntax
Apache License 2.0
1.27k stars 159 forks source link

增加Transactional Annotation 编译报错 #83

Open augustinexx opened 3 years ago

augustinexx commented 3 years ago

代码:

@DomainModel
private static class RelatedClass {

    @Transactional
    public void save() {

    }
}

错误信息:

java: 未报告的异常错误java.sql.SQLException; 必须对其进行捕获或声明以便抛出
catchex commented 3 years ago

这是IntelliJ 插件的问题,你按下面的方式写:

@DomainModel
private static class RelatedClass {

    @Transactional
    public void save() throws SQLException {

    }
}

插件没有提示必须输出SQLException