注释接口 ManyToOne


@Documented @Retention(RUNTIME) @Target(allowedTargets=PROPERTY) @Target(METHOD) public @interface ManyToOne
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    boolean
    Sometimes, the foreign key in the database is not null, but the developer has to declare the many-to-one property as a nullable property in the entity type.
  • 元素详细资料

    • inputNotNull

      boolean inputNotNull
      Sometimes, the foreign key in the database is not null, but the developer has to declare the many-to-one property as a nullable property in the entity type. Global filter is a typical scenario. Although the non-null foreign key in the database indicates that the parent object exists absolutely, once the filtering behavior is applied to the class to which the parent object belongs, it is still possible that no parent object data can be found. At this time, in order to cope with the query business, we hope to set a many-to-one association as nullable, but we still hope that the user must specify a non-null parent object in save business. At this time, you can specify the `inputNotNull` of this annotation.
      默认值:
      false