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

fetchType = FetchType.EAGER,存在时候报错 #3

Open
NaughtyChild opened this issue Jul 1, 2020 · 0 comments
Open

fetchType = FetchType.EAGER,存在时候报错 #3

NaughtyChild opened this issue Jul 1, 2020 · 0 comments

Comments

@NaughtyChild
Copy link

/**

  • UserDAO继承基类
    */
    @repository
    public interface UserDAO extends MyBatisBaseDao<User, Long> {
    @select("select * from user")
    @results({
    @Result(id = true, column = "id", property = "id"),
    @Result(column = "username", property = "username"),
    @Result(column = "password", property = "password"),
    @Result(column = "id", property = "roles", many = @many(
    select = "com.example.demo.dao.RoleDAO.listByUserid",fetchType = FetchType.EAGER
    ))
    })
    List listUserDto();
    }

这个样子会报错,把"fetchType = FetchType.EAGER"去掉才正常,这是为啥呢?

@NaughtyChild NaughtyChild changed the title 代码错误 fetchType = FetchType.EAGER,存在时候报错 Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant