Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Key
Type
Required
Default
Description
datasource
string
false
---
The default or specific datasource use
ormService.clear();This function returns void
Key
Type
Required
Description
entities
any
Yes
The argument can be one persistence entity or an array of entities to evict
ormService.evict( thisEntity );id
any
false
The id to use for eviction according to entity name or relation name
Key
Type
Required
Default
Description
entityName
string
Yes
---
The entity name to evict or use in the eviction process
relationName
string
false
The name of the relation in the entity to evict
Key
Type
Required
Default
Description
datasource
string
false
---
The default or specific datasource to use
// Check if by this point we have a dirty session, then flush it
if( ormService.isSessionDirty() ){
ORMFlush();
}Key
Type
Required
Default
Description
entity
any
Yes
---
// merge a single entity back
ormService.merge( userEntity );
// merge an array of entities
collection = [entity1,entity2,entity3];
ormService.merge( collection );Key
Type
Required
Default
Description
cacheName
string
No
---
datasource
string
No
---
// evict queries that are in the default hibernate cache
ormService.evictQueries();
// evict queries for this service
ormService.evictQueries( ormService.getQueryCacheRegion() );
// evict queries for my artists
ormService.evictQueries( "MyArtits" );The datasource to use
Key
Type
Required
Default
Description
datasource
string
false
---
The default or specific datasource use
Key
Type
Required
Default
Description
entity
any
Yes
---
// Let's get the session statistics
stats = ormService.getSessionStatistics;
// Lets output it
<cfoutput>
collection count: #stats.collectionCount# <br/>
collection keys: #stats.collectionKeys# <br/>
entity count: #stats.entityCount# <br/>
entity keys: #stats.entityKeys#
</cfoutput>function checkSomething( any User ){
// check if User is already in session
if( NOT ormService.sessionContains( arguments.User ) ){
// Not in hibernate session, so merge it in.
ormService.merge( arguments.User );
}
}