Skip to content

HHH-19004 Fix regression of TenantId not being allowed on @EmbeddedId #10674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 6.6
Choose a base branch
from

Conversation

beikov
Copy link
Member

@beikov beikov commented Jul 31, 2025

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-17117
https://hibernate.atlassian.net/browse/HHH-19004

@AfterEach
public void cleanup(SessionFactoryScope scope) {
scope.inTransaction( session -> {
session.createQuery("delete from Account").executeUpdate();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createQuery
should be avoided because it has been deprecated.
public void cleanup(SessionFactoryScope scope) {
scope.inTransaction( session -> {
session.createQuery("delete from Account").executeUpdate();
session.createQuery("delete from Client").executeUpdate();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createQuery
should be avoided because it has been deprecated.
assertNotNull( session.createSelectionQuery("where id=?1", Account.class)
.setParameter(1, acc.id)
.getSingleResultOrNull() );
assertEquals( 1, session.createQuery("from Account").getResultList().size() );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createQuery
should be avoided because it has been deprecated.
assertNull( session.createSelectionQuery("where id=?1", Account.class)
.setParameter(1, acc.id)
.getSingleResultOrNull() );
assertEquals( 0, session.createQuery("from Account").getResultList().size() );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createQuery
should be avoided because it has been deprecated.
assertNotNull( session.createSelectionQuery("where id=?1", Account.class)
.setParameter(1, acc.id)
.getSingleResultOrNull() );
assertEquals( 1, session.createQuery("from Account").getResultList().size() );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
QueryProducerImplementor.createQuery
should be avoided because it has been deprecated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant