For the complete documentation index, see llms.txt. This page is also available as Markdown.

Built-in Functions

bx-orm ships a set of Built-in Functions (BIFs) for working with entities and the underlying Hibernate session. They fall into two groups:

Entity Functions

Function
Description

Delete an entity from the database.

Check whether an entity is attached to the current ORM session.

Load an entity or array of entities from the database.

Load entities matching an example entity.

Load an array of entities by the primary key.

Merge the state of the given entity into the current persistence context (session).

Retrieve an array of entity names for this ORM application.

Retrieve a list of entity names for this ORM application.

Instantiate a new entity, optionally with a struct of properties.

Reload an entity from the database.

Save the provided entity to the persistence context.

Convert an entity or array of entities to a Query object.

ORM Session Functions

Function
Description

Clear the Hibernate session for the current context and provided (or default) datasource.

Close all Hibernate sessions for the current context on all datasources.

Close the Hibernate session for the current context and provided (or default) datasource.

Evict all entity data for a given collection on a given entity type from the second-level cache.

Evict all entity data for this entity name from the second-level cache.

Evict all queries from the named or default cache on the named or default datasource.

Execute an HQL query with (optional) parameters and specific query options.

Flush the Hibernate session, synchronizing the in-memory state with the database.

Flush all open Hibernate sessions in the current request.

Retrieve the installed Hibernate version.

Retrieve the Hibernate Session configured for this datasource or default datasource.

Retrieve the Hibernate SessionFactory configured for this datasource or default datasource.

Reload the ORM application.

Last updated

Was this helpful?