Default EmbeddableInstantiator for records

Description

Records seem to be an obvious choice for embbedded ids. Currently one needs to specify an embeddable instantiator to make that work. It would be nice to have records work out of the box, without any special configuration.

Activity

Show:

Christian Beikov August 29, 2022 at 10:03 AM

A small note on why we had to introduce XClass.ACCESS_RECORD and the new AccessType.RECORD since colleagues asked for the reasoning while discussing the PR.

When an entity uses AccessType.PROPERTY and refers to a record as embeddable, we would inherit the access type for the embeddable. Since record classes generally don’t have getters, this usually leads to embeddables for such classes to be empty. By default, we will now consider all record components for record embeddables. We also need the explicit access type so that people can switch from AccessType.FIELD to AccessType.RECORD.

Steve Ebersole May 27, 2022 at 8:15 PM

Unscheduled from 6.1, which is only a week or 2 away. Honestly not sure why it was scheduled for 6.1 anyway

Steve Ebersole May 27, 2022 at 8:14 PM

Actually, composite ids do not work with EmbeddableInstantiator. There is a bit of chicken-egg when it comes to instantiating composite ids.

This is one of those cases where, for now, I am going to wait to see if someone steps up to work on this.

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created February 7, 2022 at 9:57 AM
Updated December 22, 2022 at 10:59 PM
Resolved August 30, 2022 at 7:51 AM