
604
DEVELOPING
COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Las
t
upda
te
d 8/5/2010
ORMFlush
Description
Flushes the Hibernate session associated with the data source in the request. ORMFlush flushes all pending CRUD
operations in the request. Any changes made in the objects, in the current ORM session, are saved to the database.
If you do not specify the data source, the Hibernate session associated with the default data source is flushed.
Function syntax
ormflush([datasource])
ORMFlushall
Description
Flushes all the current Hibernate sessions in the request.
Function syntax
ormflushall()
History
ColdFusion 9 Update 1: Added this function
ORMClearSession
Description
Clears the Hibernate session associated with the given data source.
The function clears the first level cache and removes the objects that are not yet saved to the database.
If you do not specify the data source, the Hibernate session associated with the default data source is cleared.
Function syntax
Ormclearsession([datasource]
)
ORMGetSessionFactory
Description
Returns the Hibernate Session Factory object associated with the data source. Results in an error if ORM is not
configured for this data source. If you do not specify the data source, the Hibernate session factory object associated
with the default data source is returned.
For information on Session API, go to the following URL:
http://docs.jboss.org/hibernate/core/3.3/api/org/hibernate/SessionFactory.html
Function syntax
Ormgetsessionfactory([datasource])