Top Description Fields Constructors Methods
org.hibernate.annotations

public final Enum NotFoundAction

extends Enum<NotFoundAction>
Class Inheritance

Specifies how Hibernate should handle the case of an orphaned foreign key with no associated row in the referenced table. This is a situation that can only occur in a database with missing foreign key constraints.

When a database lacks foreign key constraints, it's normal for it to accumulate data with referential integrity violations over time. Alternatively, this situation is also sometimes encountered in legacy foreign key schemes where some "magic value", instead of NULL, indicates a missing reference.

Author
Emmanuel Bernard
See Also
NotFound

Field Summary

Modifier and TypeField and Description
public static final NotFoundAction
EXCEPTION

Raise an exception when a foreign key value has no corresponding primary key value in the referenced table.

public static final NotFoundAction
IGNORE

Treat a foreign key value with no corresponding primary key value in the referenced table as a null reference.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static NotFoundAction
public static NotFoundAction[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EXCEPTIONback to summary
public static final NotFoundAction EXCEPTION

Raise an exception when a foreign key value has no corresponding primary key value in the referenced table.

IGNOREback to summary
public static final NotFoundAction IGNORE

Treat a foreign key value with no corresponding primary key value in the referenced table as a null reference.

Constructor Detail

NotFoundActionback to summary
private NotFoundAction()

Method Detail

valueOfback to summary
public static NotFoundAction valueOf(String name)
valuesback to summary
public static NotFoundAction[] values()