How to map a composite identifier using an automatically @GeneratedValue with JPA and Hibernate

In this scenario, the Hibernate Fails however we can achieve this feature in other ORM (EclipseLink etc.) with some custom defined annotations.

No, it does not fail. In fact, that article that you linked already provide a way to make it work with Hibernate.

It works just fine for SQL Server too, so I’m not sure why you said it was not working.

But just because of this deficiency we have to go with some other ORMs.

What deficiency?

I’ve found some older links about this issue as well.

That’s a 9-year-old question. As long as you don’t want to use a Hibernate version that dates back to 2010, you are fine.

It’s pretty strange why hibernate community has not addressed this yet. Hoping this feature would land in Hibernate 6 or in future.

Why wait for Hibernate 6 when you have it working on Hibernate 5 too?