update

Description
POST - Update of an entity row

Methods


start( data )

Description
Called at route start
Parameters
Name Type Description
data object
Name Type Description
req object Request - See expressjs definition
res object Response - See expressjs definition
transaction object Database transaction. Use this transaction in your hooks. Commit and rollback are handled through res.success() / res.error()
idEntity number Id of entity to update

beforeUpdate( data )

Description
Called before entity update in database
Parameters
Name Type Description
data object
Name Type Description
req object Request - See expressjs definition
res object Response - See expressjs definition
transaction object Database transaction. Use this transaction in your hooks. Commit and rollback are handled through res.success() / res.error()
updateObject object Parsed form values used to update row in database
updateAssociations Array.<CoreEntity.associationObject> Associations array
files Array.<CoreEntity.fileObject> Array of files parsed from body

beforeRedirect( data )

Description
Called before redirecting to data.redirect
Parameters
Name Type Description
data object
Name Type Description
req object Request - See expressjs definition
res object Response - See expressjs definition
transaction object Database transaction. Use this transaction in your hooks. Commit and rollback are handled through res.success() / res.error()
updateObject object Parsed form values used to update row in database
updateAssociations Array.<CoreEntity.associationObject> Associations array
files Array.<CoreEntity.fileObject> Array of files parsed from body