findOrCreate

protected E findOrCreate(I id)

Loads an entity by the passed ID or creates a new one, if the entity was not found.

An entity will be loaded whether its active or not.

The new entity is created if and only if there is no record with the corresponding ID.

Return

the entity with the specified ID

Parameters

id

the ID of the entity to load