Skip to content

Conversation

@beikov
Copy link
Member

@beikov beikov commented Apr 9, 2025


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.


beikov added 2 commits April 9, 2025 13:11
FYI @gavinking, this reverts a part of what you have done in hibernate#8866 which causes JPA TCK test failure of ee.jakarta.tck.persistence.core.entityManager2.Client2.lockTransactionRequiredExceptionTest
@hibernate-github-bot
Copy link

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [daf5279, 8e0c329]

› This message was automatically generated.


public NamedGraphCreatorJpa(NamedEntityGraph annotation, String jpaEntityName) {
this.name = NullnessHelper.coalesceSuppliedValues( annotation::name, () -> jpaEntityName );
final String name = StringHelper.nullIfEmpty( annotation.name() );

Check notice

Code scanning / CodeQL

Possible confusion of local and field Note

Potentially confusing name:
NamedGraphCreatorJpa
also refers to field
name
(as this.name).
//noinspection unchecked
final EntityDomainType<T> entityDomainType = (EntityDomainType<T>) entityDomainNameResolver.apply( jpaEntityName );
return GraphParsing.parse( entityDomainType, graphContext.attributeList(), entityNameResolver );
final String name = this.name == null ? jpaEntityName : this.name;

Check notice

Code scanning / CodeQL

Possible confusion of local and field Note

Potentially confusing name: method
createEntityGraph
also refers to field
name
(as this.name).
//noinspection unchecked
final EntityDomainType<T> entityDomainType = (EntityDomainType<T>) entityDomainClassResolver.apply( (Class<T>) entityType );
return GraphParsing.parse( entityDomainType, graphContext.attributeList(), entityNameResolver );
final String name = this.name == null ? entityDomainType.getName() : this.name;

Check notice

Code scanning / CodeQL

Possible confusion of local and field Note

Potentially confusing name: method
createEntityGraph
also refers to field
name
(as this.name).
@beikov beikov merged commit d829a34 into hibernate:main Apr 9, 2025
22 of 25 checks passed
@beikov beikov deleted the jpa-tck-fixes branch April 9, 2025 13:37

private void checkTransactionNeededForLock(LockMode lockMode) {
if ( !LockMode.PESSIMISTIC_READ.greaterThan( lockMode ) ) {
if ( lockMode.greaterThan( LockMode.READ ) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, thanks, good catch, @beikov.

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.

2 participants