Example usage for org.apache.ibatis.mapping FetchType DEFAULT

List of usage examples for org.apache.ibatis.mapping FetchType DEFAULT

Introduction

In this page you can find the example usage for org.apache.ibatis.mapping FetchType DEFAULT.

Prototype

FetchType DEFAULT

To view the source code for org.apache.ibatis.mapping FetchType DEFAULT.

Click Source Link

Usage

From source file:com.baomidou.mybatisplus.MybatisMapperAnnotationBuilder.java

License:Apache License

private boolean isLazy(Result result) {
    boolean isLazy = configuration.isLazyLoadingEnabled();
    if (result.one().select().length() > 0 && FetchType.DEFAULT != result.one().fetchType()) {
        isLazy = (result.one().fetchType() == FetchType.LAZY);
    } else if (result.many().select().length() > 0 && FetchType.DEFAULT != result.many().fetchType()) {
        isLazy = (result.many().fetchType() == FetchType.LAZY);
    }/*  w w w  .ja v  a2  s .  c o  m*/
    return isLazy;
}