Annotation Type ToOne


  • @Retention(SOURCE)
    @Target(FIELD)
    public @interface ToOne
    Defines *-to-1 relation with base on existing property as foreign key or with base on automatically created backing column In case foreignKey is not specified, the following annotations can be applied together with @ToOne: - Property to specify backing column name - Unique to put the unique constraint on backing column during table creation - NotNull to put the NOT NULL constraint on backing column during table creation
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String joinProperty
      Name of the property inside the current entity which holds the key of related entity.
    • Element Detail

      • joinProperty

        java.lang.String joinProperty
        Name of the property inside the current entity which holds the key of related entity. If this parameter is absent, then an additional column is automatically created to hold the key.
        Default:
        ""