When using @ProjectionConstructor at the type level on a record type, we know we will be using the canonical constructor. In that case, there is a dedicted, records-specific API to retrieve the name of “record components”, which happen to also be the name of parameters to the canonical constructors. We could leverage that as a source of information for the name of constructor parameters, thereby making projection constructors work (at least in this specific case) even when -parameters was not used during compilation. See https://hibernate.zulipchat.com/#narrow/stream/132094-hibernate-orm-dev/topic/Records.20in.20HCANN , https://github.com/hibernate/hibernate-orm/pull/5202/files , https://github.com/hibernate/hibernate-commons-annotations/pull/21 |