Package org.hibernate.annotations
Annotation Interface Struct
Specifies the UDT (user defined type) name for the annotated embeddable
type or embedded attribute.
This annotation may be applied to an embeddable class:
@Embeddable
@Struct(name = "CUST")
public class Customer { ... }
Alternatively, it may be applied to an embedded attribute:
public class Order {@Embedded
@Struct(name = "CUST")
private Customer customer; }
- Since:
- 6.2
-
Required Element Summary
-
Optional Element Summary
-
Element Details
-
name
String nameThe name of the UDT (user defined type).
-
-
-
catalog
String catalog(Optional) The catalog of the UDT.Defaults to the default catalog.
- Default:
- ""
-
schema
String schema(Optional) The schema of the UDT.Defaults to the default schema for user.
- Default:
- ""
-
attributes
String[] attributesThe 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:
- {}
-