Find all non-nullable references to entities that have not yet
been inserted in the database, where the foreign key
is a reference to an unsaved transient entity.
If assumed is non-null, don't hit the database to make the determination, instead assume that
value; the client code must be prepared to "recover" in the case that this assumed result is incorrect.
Parameters:
entityName - The name of the entity
entity - The entity instance
assumed - The assumed return value, if avoiding database hit is desired
session - The session
Returns:
true if the given entity is not transient (meaning it is either detached/persistent)
Is this instance, which we know is not persistent, actually transient?
If assumed is non-null, don't hit the database to make the determination, instead assume that
value; the client code must be prepared to "recover" in the case that this assumed result is incorrect.
Parameters:
entityName - The name of the entity
entity - The entity instance
assumed - The assumed return value, if avoiding database hit is desired
Return the identifier of the persistent or transient object, or throw
an exception if the instance is "unsaved"
Used by OneToOneType and
ManyToOneType to determine what id value should
be used for an object that may or may not be associated with the session.
This does a "best guess" using any/all info available to use (not just the
EntityEntry).
Find all non-nullable references to entities that have not yet
been inserted in the database, where the foreign key
is a reference to an unsaved transient entity. .
Parameters:
entityName - - the entity name
entity - - the entity instance
values - - insertable properties of the object (including backrefs),
possibly with substitutions
isEarlyInsert - - true if the entity needs to be executed as soon as possible
(e.g., to generate an ID)
session - - the session
Returns:
the transient unsaved entity dependencies that are non-nullable,
or null if there are none.