Remove @GeneratedValue strategy when a custom @GenericGenerator is used

MSAL

Hibernate 7 rejects @GeneratedValue(strategy = TABLE|SEQUENCE, generator = "X") when "X" resolves to a @GenericGenerator rather than a @TableGenerator/@SequenceGenerator, and falls back to a plain JPA generator that looks for a table named "X". Dropping the strategy attribute keeps the custom generator intact and remains compatible with Hibernate 5.

org.openrewrite.hibernate.RemoveGeneratedValueStrategyWithGenericGenerator
mod run . --recipe=org.openrewrite.hibernate.RemoveGeneratedValueStrategyWithGenericGenerator

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.