cborm
module will enhance your ORM Entities and ColdBox application by providing you with features in the following areas:ActiveEntity
class and take advantage of both Active Record and Hibernate ORMcborm.models.resources.BaseHandler
it will generate the full CRUD for a specific entity based on ColdBox Resourcesunique
validator to validate against unique columnsBaseORMService
model. This model can be injected or requested via WireBox and will be used to interact with any entity in our system or with Hibernate directly:entityName
argument. You will be able to do the following category of actions from this service class:VirtualEntityService
. This way you don't have to be passing the entity names left and right, the virtual entity service will be constructed with the name and all operations will be done upon that entity.Important Please check out the latest API Docs for the latest methods and functionality: https://apidocs.ortussolutions.com/#/coldbox-modules/cborm/​
asStream()
call? What are Streams?VirtualEntityService
model which inherits from the BaseORMService
class.entityService:{EntityName}
getInstance()
getInstance( dsl = entityService:{EntityName} );
createService()
VirtualEntityService
and either adds or overrides methods. The virtual and base services takes you about 90% of the way. With you concrete services, you can complete the functionality to your liking.cborm.models.VirtualEntityService
and call the parent class constructor with the available arguments:entityname
- The name of the entity to root this service with (REQUIRED)queryCacheRegion
- The name of the query cache region if using caching, defaults to #arguments.entityName#.defaultVSCache
useQueryCaching
- Activate query caching, defaults to falseeventHandling
- Activate event handling, defaults to trueuseTransactions
- Activate transaction blocks on calls, defaults to truedefaultAsQuery
- Return query or array of objects on list(), executeQuery(), criteriaQuery(),
defaults to truedatasource
- The datasource name to be used for the rooted entity, if not we use the default datasourceActiveEntity
is just for you. Just inherit from cborm.models.ActiveEntity
and you are on your way to Active Record bliss.isValid()
and getValidationResults()
methods to help you with the validation of a populated entity.resources( "users" )