Skip to content

Conversation

@Clopma
Copy link

@Clopma Clopma commented Apr 28, 2020

Added a custom exception when failing to parse column as formula.

This annotation combination is not supported yet, even if there are plans to add support to it and some colaborators agree this is a convinient feature to add support to.

Steve Ebersole added a test to keep track of an error that ocurred previously when trying this, but now this exception is thrown. Anyway, if It is not going to be done in a short term, in my opinion there should be a custom exception being thrown.

Previous exception:

java.lang.ClassCastException: org.hibernate.mapping.Formula cannot be cast to org.hibernate.mapping.Column

New exception:

org.hibernate.AnnotationException: Formula is not supported along with this type of relationship

Also added a test with @FaliureExpected in order to extend the track of the use case.

Base automatically changed from master to main March 19, 2021 16:00
@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Mar 19, 2021

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: [e15c0ff]

› This message was automatically generated.

I don't know why but the indentation was messed up. I mannually fixed it.
@gavinking
Copy link
Member

Thanks, this was a good idea; superseded by #9320

@gavinking gavinking closed this Nov 23, 2024
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