Top Description Methods
org.hibernate.annotations

public @Interface SecondaryRow

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
@Repeatable:SecondaryRows
Imports
java.lang.annotation.Repeatable, .Retention, .Target

Specifies how the row of a jakarta.persistence.SecondaryTable should be managed.
Author
Gavin King
Since
6.2
See Also
jakarta.persistence.SecondaryTable

Method Summary

Modifier and TypeMethod and Description
public boolean
optional()

Unless disabled, specifies that no row should be inserted in the secondary table if all the columns of the secondary table would be null.

public boolean
owned()

If enabled, Hibernate will never insert or update the columns of the secondary table.

public String
table()

The name of the secondary table, as specified by jakarta.persistence.SecondaryTable#name().

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

optionalback to summary
public boolean optional()

Unless disabled, specifies that no row should be inserted in the secondary table if all the columns of the secondary table would be null. Furthermore, an outer join will always be used to read the row. Thus, by default, Hibernate avoids creating a row containing only null column values.

ownedback to summary
public boolean owned()

If enabled, Hibernate will never insert or update the columns of the secondary table.

This setting is useful if data in the secondary table belongs to some other entity, or if it is maintained externally to Hibernate.

tableback to summary
public String table()

The name of the secondary table, as specified by jakarta.persistence.SecondaryTable#name().