Package org.apache.ibatis.annotations
Annotation Type Results
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface Results
The annotation that be grouping mapping definitions for property.
How to use:public interface UserMapper { @Results({ @Result(property = "id", column = "id", id = true), @Result(property = "name", column = "name"), @Result(property = "email" column = "id", one = @One(select = "selectUserEmailById", fetchType = FetchType.LAZY)), @Result(property = "telephoneNumbers" column = "id", many = @Many(select = "selectAllUserTelephoneNumberById", fetchType = FetchType.LAZY)) }) @Select("SELECT id, name FROM users WHERE id = #{id}") User selectById(int id); }
- Author:
- Clinton Begin
-
-
-
value
Result[] value
Returns mapping definitions for property.- Returns:
- mapping definitions
- Default:
- {}
-
-