Apologies for duplicating this issue but I was not able to determine the correct protocol here. The previous issue is marked as fixed and isn't, and my reply on that thread and question on the mailing list here (https://dev.lucee.org/t/announcing-lucee-5-3-1-87-rc/4749/20?u=samuel_w_knowlton) went unanswered.
https://luceeserver.atlassian.net/browse/LDEV-1984 was marked as closed but remains in 126.96.36.199-SNAPSHOT with Hibernate 188.8.131.52-SNAPSHOT. It is incorrectly described as a case issue (e.g. ORMEvictEntity("school") when the component is "School.cfc") but this is not the case.
We have a valid component whose physical location is /model/ORM/School.cfc and whose mapping is inroll.model.ORM.School (due to an application-level mapping of /inroll pointing to the root).
EntityNew("School") works fine. ORMEvictEntity("School") (or model.ORM.School or inroll.model.ORM.School) produces a variation of:
Commandbox 4.4, OpenJDK JRE 1.8.0_181 (Docker for Windows)
I've analyzed this ticket & also check the testcase with latest version of lucee 5.3. Testcase passes fine. Can you please post your sample test application. It could be helpful to reproduce the issue.
Thanks for testing this - it made me go back and simplify our case and find the real culprit. I've attached a test app that shows both this ticket and also the behavior from (and a couple later tickets involving EHCache).
The issue is that, if you have two ORM entities using the same table in different datasources (with the datasource attribute on the persistent CFC), it causes this problem and only this problem if you then try and ORMEvictEntity with any entity at all (not just the entities with the datasource attribute specified).
The app includes a SQL init script and Application.cfc expects MSSQL, so probably easiest to just pull a Docker image of MSSQL and set the sa password to myPassword – otherwise Application.cfc can have datasource definitions removed in favor of something in Lucee admin.
To see the issue from LDEV-96, comment out cacheProvider in the Application.cfc ormsettings. It will revert to Ehcache which will fail, even though the same cacheConfig settings work under ACF.
I've checked with your test file & issue has been reproduced in my local. But remove the datasource attribute from the component TextAlt.cfc its works fine with default datasource. But not sure why this happened, will give more input about this.