cbdbinfo ignores datasource with mysql 8 and hibernate 3.5.5

Activity

Pothys - MitrahSoft 
23 January 2023 at 12:03
(edited)

I've checked this ticket and confirmed the issue happened on the latest lucee version 5.4.0.30-SNAPSHOT with Hibernate version 3.5.5.87-SNAPSHOT and Mysql extension 8.0.30. With the ORM dbCreate update operation, if the same table is available in another database and has the entity with the same table name when the application is initiating the ORM doesn’t create that table on that database configured in the datasource. And using the entity throws an error like Table 'testdb1.test4359' doesn't exist.

NOTE: This issue was not replicated by using hibernate 5.4.29.20-BETA OR MySQL 5.1.40

Stack trace:

lucee.runtime.exp.NativeException: Table 'testdb1.test4359' doesn't exist at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:972) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1869) at org.hibernate.loader.Loader.doQuery(Loader.java:718) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270) at org.hibernate.loader.Loader.doList(Loader.java:2449) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2192) at org.hibernate.loader.Loader.list(Loader.java:2187) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1706) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.lucee.extension.orm.hibernate.HibernateORMSession.load(HibernateORMSession.java:842) at org.lucee.extension.orm.hibernate.HibernateORMSession.loadAsArray(HibernateORMSession.java:664) at org.lucee.extension.orm.hibernate.HibernateORMSession.loadAsArray(HibernateORMSession.java:641) at lucee.runtime.functions.orm.EntityLoad.call(EntityLoad.java:35) at test.testcases.ldev4359.test_cfm$cf.call(/test/testcases/LDEV4359/test.cfm:14) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1056) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:948)

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 4 January 2023 at 09:05
Updated 8 April 2024 at 06:37