Package org.hibernate.annotations
Annotation Type Struct
-
@Incubating @Target({TYPE,FIELD,METHOD}) @Retention(RUNTIME) public @interface Struct
Specifies the UDT (user defined type) name for the annotated embeddable or embedded.Example:
@Embeddable
Struct(name = "CUST")
public class Customer { ... }Example: public class Order {
Embedded
Struct(name = "CUST")
private Customer customer; }- Since:
- 6.2
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]
attributes
The ordered set of attributes of the UDT, as they appear physically in the DDL.
-
-
-
Element Detail
-
name
String name
The name of the UDT (user defined type).
-
-
-
attributes
String[] attributes
The ordered set of attributes of the UDT, as they appear physically in the DDL. It is important to specify the attributes in the same order for JDBC interactions to work correctly. If the annotated type is a record, the order of record components is used as the default order. If no default order can be inferred, attributes are assumed to be in alphabetical order.- Default:
- {}
-
-