Package org.apache.ibatis.annotations
Annotation Type ConstructorArgs
The annotation that be grouping mapping definitions for constructor.
How to use:
public interface UserMapper {
@ConstructorArgs({ @Arg(column = "id", javaType = int.class, id = true),
@Arg(column = "name", javaType = String.class),
@Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
@Select("SELECT id, name FROM users WHERE id = #{id}")
User selectById(int id);
}
- Author:
- Clinton Begin
-
Optional Element Summary
-
Element Details
-
value
Arg[] valueReturns mapping definitions for constructor.- Returns:
- mapping definitions
- Default:
{}
-