Indicates if this object already belongs to an db
true
if this object belongs already to an db otherwise false
Indicates if this object is represents a db object, but was not loaded up to now
Indicates that this object was modified and the object was not written back to the db
Indicates if this object represents the state of the db and was not modified in any manner
Indicates if there is currently no exclusive operation executed
true
If no exclusive lock is hold
Waits on the previously requested operation and calls the doneCallback if the operation is fulfilled
A promise which completes successfully, when the previously requested operation completes
Optional
doneCallback: ((this: Metadata) => any)The callback which will be invoked when the previously operations on this object is completed.
Optional
failCallback: ((error: Error) => any)When the lock can't be released caused by a none recoverable error
Indicates that the associated object isn't available
Protected
withProtected
Try to aquire an exclusive lock and executes the given callback.
A promise
If the lock can't be aquired
The exclusive operation to execute
Optional
critical: boolean = falseIndicates if the operation is critical. If the operation is critical and the operation fails, then the lock will not be released
Static
createCreates temporary metadata instance for the given embeddable type
The created metadata for the object
The type of the object
Optional
db: EntityManagera EntityManager which will be attached to the state
Creates a metadata instance for the given entity type
The created metadata for the object
The type of the object
Optional
db: EntityManagera optional EntityManager which will be attached to the state
Static
getGenerated using TypeDoc
The Metadata instance tracks the state of an object and checks if the object state was changed since last load/update. The metadata keeps therefore the state of:
Metadata#get(object) can be used on any managed object to retrieve the metadata of the root object