当前使用版本(必填,否则不予处理)
3.4.3
该问题是如何引起的?(确定最新版也有问题再提!!!)
TableInfoHelper读取@TableField注解时,不能获取子类自定义注解
重现步骤(如果有就写完整)
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@TableField
public @interface ConditionField {
@AliasFor(annotation = TableField.class)
String value() default "";
@AliasFor(annotation = TableField.class)
boolean exist() default true;
@AliasFor(annotation = TableField.class)
String condition() default "";
@AliasFor(annotation = TableField.class)
String update() default "";
@AliasFor(annotation = TableField.class)
FieldStrategy insertStrategy() default FieldStrategy.NEVER;
@AliasFor(annotation = TableField.class)
FieldStrategy updateStrategy() default FieldStrategy.NEVER;
@AliasFor(annotation = TableField.class)
FieldStrategy whereStrategy() default FieldStrategy.DEFAULT;
@AliasFor(annotation = TableField.class)
FieldFill fill() default FieldFill.DEFAULT;
@AliasFor(annotation = TableField.class)
boolean select() default true;
@AliasFor(annotation = TableField.class)
boolean keepGlobalFormat() default false;
@AliasFor(annotation = TableField.class)
JdbcType jdbcType() default JdbcType.UNDEFINED;
@AliasFor(annotation = TableField.class)
Class<? extends TypeHandler> typeHandler() default UnknownTypeHandler.class;
@AliasFor(annotation = TableField.class)
boolean javaType() default false;
@AliasFor(annotation = TableField.class)
String numericScale() default "";
}
报错信息
希望TableInfoHelper注册Field信息时,也能读取到在被@ConditionField注解设置的@Field相关属性的值
Comment From: huayanYu
重写源码吧, 每个人都重写不一样的,怎么支持? 来一个支持一个? 建议自己重写源码
Comment From: mengyongfeng
怎么最近的小开发都这么浮躁。 final TableField tableField = field.getAnnotation(TableField.class); 这里只能获取到直接注解到类变量上的@TableField 如果自定义了一个注解: @TableField public @interface ConditionField {..}
就是希望能在field.getAnnotation(TableField.class);的时候,@ConditionField注解的字段也能读取到,因为@ConditionField的定义有@TableField
Comment From: huayanYu
来贡献代码嘛 just do it