config/Coldbox.cfc
in the moduleSettings.cborm
struct:eventLoader
: If enabled, upon application startup it will register all the following events for EVERY entity managed by HibernateeventPrefix
: By default if you enable the eventLoader
then we will register interception points for all crud events for every entity using the pattern pre|post{Entity}{Action}
. You can use this setting to prefix the events like so: {eventPrefix}pre|post{Entity}{Action}
maxRows
: By default the cborm resource handler will paginate results, you can choose your pagination window here.maxRowsLimit
: By default it will not allow more than 500 records to be returned from the listing method. However, you can make this 0 or anything you like.pre{entityName}List
post{entityName}List
pre{entityName}Save
post{entityName}Save
pre{entityName}Show
post{entityName}Show
pre{entityName}Update
post{entityName}Update
pre{entityName}Delete
post{entityName}Delete
eventPrefix
setting to add a prefix to all these events.includes
and excludes
so you can decide what will be marshalled out of the service.config/ColdBox.cfc
or your Module's router:coldbox create handler settings
or just create the file manually. Make sure it extends our cborm resource handler: cborm.models.resources.BaseHandler
sortOrder
: The default sorting order string: permission, name, data desc, etc
entity
: The name of the entity this resource handler controls. Singular name please. Used for announcing events.saveMethod
: The name of the method to use for save persistence on the ORM service. Defaults to save()
deleteMethod
: The name of the method to use for deleting entites on the ORM service. Defaults to delete()
resources()
method.index()
/{resource}
create()
/{resource}
show()
/{resource}/:id
EntityNotFound
update()
/{resource}/:id
EntityNotFound
, Validationdelete()
/{resource}/:id
EntityNotFound
includes
string
empty
excludes
string
empty
ignoreDefaults
boolean
false
sortOrder
string
variables.sortOrder
page
numeric
1
includes
string
empty
excludes
string
empty
ignoreDefaults
boolean
false
includes
string
empty
excludes
string
empty
ignoreDefaults
boolean
false
id
numeric
0
includes
string
empty
excludes
string
empty
ignoreDefaults
boolean
false
id
numeric
0
id
numeric
0
criteria
Criteria
null
results
struct
{ count:0, records:[] }
count :
The records foundrecords
: The array of entitiespopulate
struct
{}
populateModel()
method alongside the entity that's being created.validate
struct
{}
validateOrFail()
method alongside the entity that's being validated.populate
struct
{}
populateModel()
method alongside the entity that's being updated.validate
struct
{}
validateOrFail()
method alongside the entity that's being updated.