Package org.apache.ibatis.annotations
Annotation Type MapKey
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface MapKeyThe annotation that specify the property name(or column name) for a key value ofMap.
How to use:public interface UserMapper { @MapKey("id") @Select("SELECT id, name FROM users WHERE name LIKE #{name} || '%") Map<Integer, User> selectByStartingWithName(String name); }- Author:
- Clinton Begin
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.StringvalueReturns the property name(or column name) for a key value ofMap.
-