Top Description Methods
org.hibernate.annotations

public @Interface ColumnDefault

extends Annotation
Annotations
@Target:FIELD, METHOD
@Retention:RUNTIME
Imports
java.lang.annotation.Retention, .Target

Specifies that a column has a default value specified in DDL.

@ColumnDefault may be used in combination with:

If @Generated is not used, a default value can cause state held in memory to lose synchronization with the database.

Author
Steve Ebersole
See Also
GeneratedColumn, DialectOverride.ColumnDefault

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a SQL expression that evaluates to the default column value
value
()

The default value to use in generated DDL.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

The default value to use in generated DDL.

Returns:String

a SQL expression that evaluates to the default column value