bx-orm - WrongClassException when re-querying for the same object in a session

Description

None

Environment

With the following ORM settings in the cbORM test-harness tests folder ( note the cfclocation )

The following query:

Fails with:

Note the presence of boxgenerated.boxclass.moduleroot.cborm.test__harness.models.entities.Category$cfc

rather than the declared models path of:

This may be a class resolver issue. The entities will load without error outside of HQL queries.

Activity

Show:

Jon Clausen March 13, 2025 at 5:02 PM

The root cause was that the entity name resolution was not using the main resolver in BoxClassInstantiator

Jon Clausen March 11, 2025 at 7:00 PM
Edited

Edited: This is not related to the secondary cache.
This is an actually an issue the class of the stored session object not matching. Putting an ormClearSession between the two queries below makes the error go away. To replicate:

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Priority

Sentry

Created March 8, 2025 at 6:11 PM
Updated March 13, 2025 at 5:02 PM
Resolved March 13, 2025 at 5:01 PM