Entity Services Not using the Primary Datasource No Longer Work with Dynamic Processor and Criteria

Description

In the current version of CBORM, if an entity has a different datasource than the default datsource, the DynamicProcessor and Criteria queries fail when used by the entity service. This is because the datasource for these methods must be provided explicitly to the ormExecuteQuery and the criteria builder.

The only workaround, at this time is for criteria queries, which is to declare `variables.datasource` in the entity service.

For the Dynamic processor, the datasource needs to be explicitly set in the `processMethod` after the entity name has been detected:

arguments.options[ "datasource" ] = arguments.ormService.getOrm().getEntityDatasource( arguments.entityName );

This is a regression from v1.5 of cborm. v2 was not tested.

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Affects versions

Priority

Sentry

Created March 4, 2022 at 5:23 PM
Updated March 9, 2022 at 5:46 PM
Resolved March 9, 2022 at 5:46 PM