Unique注解定义:
DbUtils解析部分:
用法:
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Unique {
}
DbUtils解析部分:
if (ColumnUtils.isUnique(column.getColumnField())) {
sqlBuffer.append(" UNIQUE");
}
用法:
@Unique
private int age;