Skip to content

Conversation

Qcheck12345
Copy link

@Qcheck12345 Qcheck12345 commented Aug 5, 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-19684

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Aug 5, 2025

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

@Qcheck12345 Qcheck12345 changed the title HHH-19684 HHH-19684 Fix ClassCastException when using enums as part of a composite type Aug 5, 2025
@yrodiere
Copy link
Member

yrodiere commented Oct 6, 2025

I rebased and squashed... let's merge if tests pass @beikov?

@yrodiere yrodiere requested a review from beikov October 6, 2025 11:42
case SqlTypes.NAMED_ENUM:
appender.quoteStart();
appender.append( (String) subValue );
appender.append( jdbcJavaType.unwrap( subValue, String.class, options ) );
Copy link
Member

Choose a reason for hiding this comment

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

As far as I can say, the unwrapping should have happened in org.hibernate.type.descriptor.jdbc.StructHelper#injectJdbcValue and at this point, any JDBC-Stringy value should be a String. Maybe the EnumJdbcType has a wrong implementation for getBindValue()?

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.

3 participants