File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
hibernate-core/src/main/java/org/hibernate/annotations Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 17
17
18
18
/**
19
19
* Specifies the maximum length of a SQL array type mapped by
20
- * the annotated attribute. For example:
20
+ * the annotated attribute.
21
+ * <p>
22
+ * For example:
21
23
* <pre>
22
- *
24
+ * {@code @Array(length=100)} // the maximum length of the SQL array
25
+ * {@code @Column(length=64)} // the maximum length of the strings in the array
26
+ * String[] strings;
23
27
* </pre>
24
28
*/
25
29
@ Incubating
26
30
@ Target ({FIELD , METHOD })
27
31
@ Retention ( RUNTIME )
28
32
public @interface Array {
33
+ /**
34
+ * The maximum length of the array.
35
+ */
29
36
int length ();
30
37
}
Original file line number Diff line number Diff line change 23
23
* This annotation may be applied to an embeddable class:
24
24
* <pre>
25
25
* {@code @Embeddable}
26
- * {@code Struct(name = "CUST")}
26
+ * {@code @ Struct(name = "CUST")}
27
27
* public class Customer { ... }
28
28
* </pre>
29
+ * <p>
29
30
* Alternatively, it may be applied to an embedded attribute:
30
31
* <pre>
31
32
* public class Order {
32
- * {@code Embedded}
33
- * {@code Struct(name = "CUST")}
33
+ * {@code @ Embedded}
34
+ * {@code @ Struct(name = "CUST")}
34
35
* private Customer customer;
35
36
* }
36
37
* </pre>
You can’t perform that action at this time.
0 commit comments