Composite key internal implementation

Hi Team!

Could you please find out how does composite primary key is implemented in Hibernate?

Imagine we have an Embeddable with relations ManyToOne and we embed as EmbeddedId. Although Hibernate documentation have a following note: “However, that is not portably supported by the Jakarta Persistence specification. In Jakarta Persistence terms, one would use “derived identifiers”.”.

Does in this case Hibernate stores the link to the Session Factory in an Embeddable object?

The documentation is just kindly pointing out to you that this is a Hibernate ORM specific feature and that the Jakarta Persistence specification does not allow doing this. So if you switch to a differente Jakarta Persistence implementation like e.g. EclipseLink, it might fail to boot up.