Top Description Fields Constructors Methods
org.hibernate.annotations

public final Enum NotFoundAction

extends Enum<NotFoundAction>
Class Inheritance
Imports
org.hibernate.FetchNotFoundException

Possible actions when the database contains a non-null fk with no matching target. This also implies that there are no physical foreign-key constraints on the database. As an example, consider a typical Customer/Order model. These actions apply when a non-null `orders.customer_fk` value does not have a corresponding value in `customers.id`. Generally this will occur in 2 scenarios:
Authors
Steve Ebersole, Emmanuel Bernard

Field Summary

Modifier and TypeField and Description
public static final NotFoundAction
EXCEPTION

Throw an exception when the association is not found (default and recommended).

public static final NotFoundAction
IGNORE

Ignore the association when not found in database.

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

Throw an exception when the association is not found (default and recommended).

See Also
FetchNotFoundException
IGNOREback to summary
public static final NotFoundAction IGNORE

Ignore the association when not found in database. Effectively treats the association as null, despite the non-null foreign-key value.

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()