Package org.hibernate.annotations
Annotation Type ColumnTransformer
-
@Target({FIELD,METHOD}) @Retention(RUNTIME) @Repeatable(ColumnTransformers.class) public @interface ColumnTransformer
Specifies custom SQL expressions used to read and write to the column mapped by the annotated persistent attribute in all generated SQL involving the annotated persistent attribute.- A
write()
expression must contain exactly one JDBC-style '?' placeholder. - A
read()
expression may not contain JDBC-style placeholders.
{@code
- See Also:
ColumnTransformers
- A
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
forColumn
The name of the mapped column, if a persistent attribute maps to multiple columns.String
read
A custom SQL expression used to read from the column.String
write
A custom SQL expression used to write to the column.
-
-
-
Element Detail
-
forColumn
String forColumn
The name of the mapped column, if a persistent attribute maps to multiple columns. Optional if a persistent attribute is mapped to a single column- Default:
- ""
-
-
-
read
String read
A custom SQL expression used to read from the column.- Default:
- ""
-
-
-
write
String write
A custom SQL expression used to write to the column. The expression must contain exactly one JDBC-style '?' placeholder.- Default:
- ""
-
-