WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar) WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release 23:06:11.225 [main] INFO org.hibernate.orm.core -- HHH000001: Hibernate ORM core version 7.4.5.Final 23:06:11.265 [main] INFO org.hibernate.orm.cache -- HHH90001028: Second-level cache region factory [org.hibernate.cache.jcache.internal.JCacheRegionFactory] 23:06:11.512 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use) 23:06:11.710 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info: Database JDBC URL [jdbc:h2:mem:naturalidl2;DB_CLOSE_DELAY=-1] Database driver: H2 JDBC Driver Database dialect: H2Dialect Database version: 2.4.240 Default catalog/schema: NATURALIDL2/PUBLIC Autocommit mode: false Isolation level: READ_COMMITTED JDBC fetch size: 100 Pool: DriverManagerConnectionProvider Minimum pool size: 1 Maximum pool size: 20 WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::objectFieldOffset has been called by org.ehcache.impl.internal.concurrent.ThreadLocalRandomUtil (file:/sessions/intelligent-loving-cori/.m2/repository/org/ehcache/ehcache/3.10.8/ehcache-3.10.8-jakarta.jar) WARNING: Please consider reporting this to the maintainers of class org.ehcache.impl.internal.concurrent.ThreadLocalRandomUtil WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release 23:06:12.413 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'. 23:06:12.478 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' created in EhcacheManager. 23:06:12.489 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'. 23:06:12.492 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' created in EhcacheManager. 23:06:12.992 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration) RESULT[naturalid-l2-cache-real-miss-then-hit]: first lookup (genuine cold row) queries=1, naturalId miss=1, naturalId put=1 | second lookup (new session) cumulative queries=1, naturalId hits=1 23:06:13.193 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' removed from EhcacheManager. 23:06:13.194 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' removed from EhcacheManager. 23:06:13.218 [main] INFO org.hibernate.orm.cache -- HHH90001028: Second-level cache region factory [org.hibernate.cache.jcache.internal.JCacheRegionFactory] 23:06:13.257 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use) 23:06:13.263 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info: Database JDBC URL [jdbc:h2:mem:naturalidl2;DB_CLOSE_DELAY=-1] Database driver: H2 JDBC Driver Database dialect: H2Dialect Database version: 2.4.240 Default catalog/schema: NATURALIDL2/PUBLIC Autocommit mode: false Isolation level: READ_COMMITTED JDBC fetch size: 100 Pool: DriverManagerConnectionProvider Minimum pool size: 1 Maximum pool size: 20 23:06:13.306 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'. 23:06:13.310 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' created in EhcacheManager. 23:06:13.311 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'. 23:06:13.323 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' created in EhcacheManager. 23:06:13.335 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration) RESULT[naturalid-l2-cache]: immediately after persist()+commit(): queries=2, naturalId cache put=1, naturalId cache hit=0 -- @NaturalIdCache populates the L2 region on INSERT, before anyone ever looked it up. RESULT[naturalid-l2-cache]: session1 (post-insert) cumulative queries=0 | session2 (new session, same natural id) cumulative queries=0, naturalId cache hits=2 23:06:13.375 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' removed from EhcacheManager. 23:06:13.375 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' removed from EhcacheManager. HHH90000033: Encountered use of deprecated annotation [interface jakarta.persistence.Temporal] at com.ankurm.hibernatedemo.persistenceannotations.TemporalOnJavaTimeEntity.eventDate. HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'. HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'. create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_identity_hash_set_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_identity_hash_set_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional create global temporary table HTE_cached_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_cached_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional create global temporary table HTE_mixed_access_entity(rn_ integer not null, id bigint, computedLabel varchar(255), rawValue varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_mixed_access_entity(rn_ integer not null, id bigint, computedLabel varchar(255), rawValue varchar(255), primary key (rn_)) transactional create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_json_column_entity(rn_ integer not null, id bigint, details json, primary key (rn_)) transactional Hibernate: create global temporary table HTE_json_column_entity(rn_ integer not null, id bigint, details json, primary key (rn_)) transactional create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_temporal_on_java_time_entity(eventDate date, rn_ integer not null, id bigint, primary key (rn_)) transactional Hibernate: create global temporary table HTE_temporal_on_java_time_entity(eventDate date, rn_ integer not null, id bigint, primary key (rn_)) transactional create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_company(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_company(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_immutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_immutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional create global temporary table HTE_natural_id_equals_entity(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_natural_id_equals_entity(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional create global temporary table HTE_department(rn_ integer not null, company_id bigint, id bigint, deptCode varchar(255), name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_department(rn_ integer not null, company_id bigint, id bigint, deptCode varchar(255), name varchar(255), primary key (rn_)) transactional create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional create global temporary table HTE_enumerated_value_entity(rn_ integer not null, id bigint, priority varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_enumerated_value_entity(rn_ integer not null, id bigint, priority varchar(255), primary key (rn_)) transactional create global temporary table HTE_mutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_mutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional create global temporary table HTE_id_based_equals_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_id_based_equals_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional Hibernate: create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional create global temporary table HTE_enum_default_ordinal_entity(rn_ integer not null, status tinyint, id bigint, primary key (rn_)) transactional Hibernate: create global temporary table HTE_enum_default_ordinal_entity(rn_ integer not null, status tinyint, id bigint, primary key (rn_)) transactional create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id)) Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id)) create table cached_natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id)) Hibernate: create table cached_natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id)) create table company (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table company (id bigint not null, name varchar(255), primary key (id)) create table department (id bigint not null, dept_code varchar(255), name varchar(255), company_id bigint, primary key (id)) Hibernate: create table department (id bigint not null, dept_code varchar(255), name varchar(255), company_id bigint, primary key (id)) create table enum_default_ordinal_entity (id bigint not null, status tinyint check ((status between 0 and 2)), primary key (id)) Hibernate: create table enum_default_ordinal_entity (id bigint not null, status tinyint check ((status between 0 and 2)), primary key (id)) create table enumerated_value_entity (id bigint not null, priority varchar(255) check ((priority in ('H','L','M'))), primary key (id)) Hibernate: create table enumerated_value_entity (id bigint not null, priority varchar(255) check ((priority in ('H','L','M'))), primary key (id)) create table id_based_equals_entity (id bigint not null, label varchar(255), primary key (id)) Hibernate: create table id_based_equals_entity (id bigint not null, label varchar(255), primary key (id)) create table identity_hash_set_entity (id bigint not null, label varchar(255), primary key (id)) Hibernate: create table identity_hash_set_entity (id bigint not null, label varchar(255), primary key (id)) create table immutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id)) Hibernate: create table immutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id)) create table json_column_entity (id bigint not null, details json, primary key (id)) Hibernate: create table json_column_entity (id bigint not null, details json, primary key (id)) create table mixed_access_entity (id bigint not null, computed_label varchar(255), raw_value varchar(255), primary key (id)) Hibernate: create table mixed_access_entity (id bigint not null, computed_label varchar(255), raw_value varchar(255), primary key (id)) create table mutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id)) Hibernate: create table mutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id)) create table natural_id_equals_entity (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id)) Hibernate: create table natural_id_equals_entity (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id)) create table natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id)) Hibernate: create table natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id)) create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id)) Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id)) create table override_entity (id bigint not null, annotation_name varchar(255), primary key (id)) Hibernate: create table override_entity (id bigint not null, annotation_name varchar(255), primary key (id)) create table temporal_on_java_time_entity (id bigint not null, event_date date, primary key (id)) Hibernate: create table temporal_on_java_time_entity (id bigint not null, event_date date, primary key (id)) create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id)) create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id)) create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id)) create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id)) create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id)) create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id)) create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id)) create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id)) create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id)) Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id)) create table widget_sequence (id bigint not null, name varchar(255), primary key (id)) Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id)) alter table if exists cached_natural_id_product drop constraint if exists UKje04jryb5drgla4ee8f9wb09h Hibernate: alter table if exists cached_natural_id_product drop constraint if exists UKje04jryb5drgla4ee8f9wb09h alter table if exists cached_natural_id_product add constraint UKje04jryb5drgla4ee8f9wb09h unique (sku) Hibernate: alter table if exists cached_natural_id_product add constraint UKje04jryb5drgla4ee8f9wb09h unique (sku) alter table if exists department drop constraint if exists UKshij4bp4ym2hmov81mkrwn0c8 Hibernate: alter table if exists department drop constraint if exists UKshij4bp4ym2hmov81mkrwn0c8 alter table if exists department add constraint UKshij4bp4ym2hmov81mkrwn0c8 unique (company_id, dept_code) Hibernate: alter table if exists department add constraint UKshij4bp4ym2hmov81mkrwn0c8 unique (company_id, dept_code) alter table if exists immutable_natural_id_entity drop constraint if exists UK5gvhgvwmwj20jj1uh486alunu Hibernate: alter table if exists immutable_natural_id_entity drop constraint if exists UK5gvhgvwmwj20jj1uh486alunu alter table if exists immutable_natural_id_entity add constraint UK5gvhgvwmwj20jj1uh486alunu unique (code) Hibernate: alter table if exists immutable_natural_id_entity add constraint UK5gvhgvwmwj20jj1uh486alunu unique (code) alter table if exists mutable_natural_id_entity drop constraint if exists UK27w8jwneoik5sx2gt8q9rduf5 Hibernate: alter table if exists mutable_natural_id_entity drop constraint if exists UK27w8jwneoik5sx2gt8q9rduf5 alter table if exists mutable_natural_id_entity add constraint UK27w8jwneoik5sx2gt8q9rduf5 unique (code) Hibernate: alter table if exists mutable_natural_id_entity add constraint UK27w8jwneoik5sx2gt8q9rduf5 unique (code) alter table if exists natural_id_equals_entity drop constraint if exists UKs5mlj556xgu0u0dl8jq93xvi1 Hibernate: alter table if exists natural_id_equals_entity drop constraint if exists UKs5mlj556xgu0u0dl8jq93xvi1 alter table if exists natural_id_equals_entity add constraint UKs5mlj556xgu0u0dl8jq93xvi1 unique (sku) Hibernate: alter table if exists natural_id_equals_entity add constraint UKs5mlj556xgu0u0dl8jq93xvi1 unique (sku) alter table if exists natural_id_product drop constraint if exists UK4uilk3eo365mgcetnh0da4n3b Hibernate: alter table if exists natural_id_product drop constraint if exists UK4uilk3eo365mgcetnh0da4n3b alter table if exists natural_id_product add constraint UK4uilk3eo365mgcetnh0da4n3b unique (sku) Hibernate: alter table if exists natural_id_product add constraint UK4uilk3eo365mgcetnh0da4n3b unique (sku) create sequence book_seq start with 1 increment by 50 Hibernate: create sequence book_seq start with 1 increment by 50 create sequence cached_natural_id_product_seq start with 1 increment by 50 Hibernate: create sequence cached_natural_id_product_seq start with 1 increment by 50 create sequence company_seq start with 1 increment by 50 Hibernate: create sequence company_seq start with 1 increment by 50 create sequence department_seq start with 1 increment by 50 Hibernate: create sequence department_seq start with 1 increment by 50 create sequence enum_default_ordinal_entity_seq start with 1 increment by 50 Hibernate: create sequence enum_default_ordinal_entity_seq start with 1 increment by 50 create sequence enumerated_value_entity_seq start with 1 increment by 50 Hibernate: create sequence enumerated_value_entity_seq start with 1 increment by 50 create sequence id_based_equals_entity_seq start with 1 increment by 50 Hibernate: create sequence id_based_equals_entity_seq start with 1 increment by 50 create sequence identity_hash_set_entity_seq start with 1 increment by 50 Hibernate: create sequence identity_hash_set_entity_seq start with 1 increment by 50 create sequence immutable_natural_id_entity_seq start with 1 increment by 50 Hibernate: create sequence immutable_natural_id_entity_seq start with 1 increment by 50 create sequence json_column_entity_seq start with 1 increment by 50 Hibernate: create sequence json_column_entity_seq start with 1 increment by 50 create sequence mixed_access_entity_seq start with 1 increment by 50 Hibernate: create sequence mixed_access_entity_seq start with 1 increment by 50 create sequence mutable_natural_id_entity_seq start with 1 increment by 50 Hibernate: create sequence mutable_natural_id_entity_seq start with 1 increment by 50 create sequence natural_id_equals_entity_seq start with 1 increment by 50 Hibernate: create sequence natural_id_equals_entity_seq start with 1 increment by 50 create sequence natural_id_product_seq start with 1 increment by 50 Hibernate: create sequence natural_id_product_seq start with 1 increment by 50 create sequence override_entity_seq start with 1 increment by 50 Hibernate: create sequence override_entity_seq start with 1 increment by 50 create sequence temporal_on_java_time_entity_seq start with 1 increment by 50 Hibernate: create sequence temporal_on_java_time_entity_seq start with 1 increment by 50 create sequence widget_alloc10_seq start with 1 increment by 10 Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10 create sequence widget_alloc1_seq start with 1 increment by 1 Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1 create sequence widget_alloc25_seq start with 1 increment by 25 Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25 create sequence widget_alloc50_seq start with 1 increment by 50 Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50 create sequence widget_batch_sweep1_seq start with 1 increment by 50 Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50 create sequence widget_seq start with 1 increment by 25 Hibernate: create sequence widget_seq start with 1 increment by 25 alter table if exists department add constraint FKh1m88q0f7sc0mk76kju4kcn6f foreign key (company_id) references company Hibernate: alter table if exists department add constraint FKh1m88q0f7sc0mk76kju4kcn6f foreign key (company_id) references company alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3 WARNING: A Java agent has been loaded dynamically (/sessions/intelligent-loving-cori/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.11/byte-buddy-agent-1.18.11.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended select next value for company_seq Hibernate: select next value for company_seq select next value for company_seq Hibernate: select next value for company_seq select next value for department_seq Hibernate: select next value for department_seq select next value for department_seq Hibernate: select next value for department_seq /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?) binding parameter (1:VARCHAR) <- [Acme] binding parameter (2:BIGINT) <- [1] /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?) binding parameter (1:VARCHAR) <- [Other Co] binding parameter (2:BIGINT) <- [2] /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?) binding parameter (1:BIGINT) <- [1] binding parameter (2:VARCHAR) <- [ENG-01] binding parameter (3:VARCHAR) <- [Acme Engineering] binding parameter (4:BIGINT) <- [1] /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?) binding parameter (1:BIGINT) <- [2] binding parameter (2:VARCHAR) <- [ENG-01] binding parameter (3:VARCHAR) <- [Other Co Engineering] binding parameter (4:BIGINT) <- [2] select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=? Hibernate: select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=? binding parameter (1:BIGINT) <- [1] binding parameter (2:VARCHAR) <- [ENG-01] RESULT[composite-naturalid]: byNaturalId(company=Acme, deptCode=ENG-01) resolved to 'Acme Engineering' in 1 query/queries /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?) binding parameter (1:VARCHAR) <- [SQL-Capture Co] binding parameter (2:BIGINT) <- [3] /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?) binding parameter (1:BIGINT) <- [3] binding parameter (2:VARCHAR) <- [OPS-1] binding parameter (3:VARCHAR) <- [Operations] binding parameter (4:BIGINT) <- [3] select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=? Hibernate: select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=? binding parameter (1:BIGINT) <- [3] binding parameter (2:VARCHAR) <- [OPS-1] select next value for mutable_natural_id_entity_seq Hibernate: select next value for mutable_natural_id_entity_seq /* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?) binding parameter (1:VARCHAR) <- [CODE-X] binding parameter (2:BIGINT) <- [1] select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=? Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=? binding parameter (1:BIGINT) <- [1] /* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=? Hibernate: /* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=? binding parameter (1:VARCHAR) <- [CODE-Y] binding parameter (2:BIGINT) <- [1] /* dynamic native SQL query */ select code from mutable_natural_id_entity where id = 1 Hibernate: /* dynamic native SQL query */ select code from mutable_natural_id_entity where id = 1 RESULT[naturalid-mutable-mutation]: flush succeeded, DB column now = CODE-Y select next value for mutable_natural_id_entity_seq Hibernate: select next value for mutable_natural_id_entity_seq /* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?) binding parameter (1:VARCHAR) <- [CODE-OLD] binding parameter (2:BIGINT) <- [2] select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=? Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=? binding parameter (1:BIGINT) <- [2] /* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=? Hibernate: /* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=? binding parameter (1:VARCHAR) <- [CODE-NEW] binding parameter (2:BIGINT) <- [2] select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=? Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=? binding parameter (1:VARCHAR) <- [CODE-OLD] select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=? Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=? binding parameter (1:VARCHAR) <- [CODE-NEW] RESULT[naturalid-mutable-stale-lookup]: byNaturalId("CODE-OLD") = null, byNaturalId("CODE-NEW") = 2 select next value for immutable_natural_id_entity_seq Hibernate: select next value for immutable_natural_id_entity_seq /* insert for com.ankurm.hibernatedemo.naturalid.ImmutableNaturalIdEntity */insert into immutable_natural_id_entity (code,id) values (?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.ImmutableNaturalIdEntity */insert into immutable_natural_id_entity (code,id) values (?,?) binding parameter (1:VARCHAR) <- [CODE-A] binding parameter (2:BIGINT) <- [1] select inie1_0.id,inie1_0.code from immutable_natural_id_entity inie1_0 where inie1_0.id=? Hibernate: select inie1_0.id,inie1_0.code from immutable_natural_id_entity inie1_0 where inie1_0.id=? binding parameter (1:BIGINT) <- [1] RESULT[naturalid-immutable-mutation]: flushing a changed IMMUTABLE natural id threw: org.hibernate.HibernateException: An immutable natural identifier of entity com.ankurm.hibernatedemo.naturalid.ImmutableNaturalIdEntity was altered from `CODE-A` to `CODE-B` select next value for natural_id_product_seq Hibernate: select next value for natural_id_product_seq /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?) binding parameter (1:VARCHAR) <- [Widget] binding parameter (2:VARCHAR) <- [SKU-L1-1] binding parameter (3:BIGINT) <- [1] select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=? Hibernate: select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=? binding parameter (1:VARCHAR) <- [SKU-L1-1] RESULT[naturalid-l1-no-l2]: queries after 1st bySimpleNaturalId=1, after 2nd (same session)=1 (no @NaturalIdCache, no L2 cache provider configured) select next value for natural_id_product_seq Hibernate: select next value for natural_id_product_seq /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?) binding parameter (1:VARCHAR) <- [Gadget] binding parameter (2:VARCHAR) <- [SKU-L1-2] binding parameter (3:BIGINT) <- [2] select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=? Hibernate: select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=? binding parameter (1:VARCHAR) <- [SKU-L1-2] select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=? Hibernate: select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=? binding parameter (1:VARCHAR) <- [SKU-L1-2] RESULT[naturalid-cross-session-no-l2]: queries after session 1 lookup=1, cumulative after a NEW session repeats the same lookup=2 (no L2 cache -- the L1 natural-id map dies with the session) select next value for natural_id_equals_entity_seq Hibernate: select next value for natural_id_equals_entity_seq /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdEqualsEntity */insert into natural_id_equals_entity (name,sku,id) values (?,?,?) Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdEqualsEntity */insert into natural_id_equals_entity (name,sku,id) values (?,?,?) binding parameter (1:VARCHAR) <- [widget] binding parameter (2:VARCHAR) <- [SKU-EQ-1] binding parameter (3:BIGINT) <- [1] RESULT[naturalid-equals-hashset]: after persist(), e.getId()=1, e.getSku()=SKU-EQ-1, set.contains(e) = true (equals/hashCode based on the immutable natural id, NOT the surrogate id) RESULT[naturalid-equals-transient-dup]: a.equals(b)=true for two transient instances sharing sku='SKU-EQ-DUP' but different names; HashSet.add(b) rejected it as a duplicate = true RESULT[naturalid-equals-transient]: a.equals(b) for two DIFFERENT transient instances = false (both have null surrogate ids, but different natural ids)