array fields and static metamodel

Description

For a field String[] array; the processor generates a SingularAttribute, but Hibernate complains at startup time:

I’m unclear on what should actually happen here.

Activity

Gavin KingDecember 4, 2024 at 12:53 PM

Fixed by . Thanks!!

Gavin KingDecember 4, 2024 at 11:40 AM

My bad, the problem actually occurs for:

As I think you already figured out.

Čedomir IgalyDecember 2, 2024 at 8:47 PM
Edited

Perhaps your entity class has not been so simple, but this problem is real I guess that this will affect properties that are arrays on many side of X-to-many relationship. I have no example, but guess that it can cause troubles with criteria queries.

I’ve made change that fixes 46 out of 49 those error messages in logs and generated draft pull request #9360 . Hope that tomorrow will be able to fix the rest of cases. Rest of the error log messages are for classes annotated as either MappedSuperclass or Embeddablewith annotations on getters. In that case access type can not be properly resolved and it is set to default value which is FIELD

Gavin KingDecember 2, 2024 at 2:14 PM

Yeah, hrrm, it appears to be working for me now.

Weird, because I don’t see which change it was that fixed it.

Čedomir IgalyDecember 2, 2024 at 2:02 PM

It is strange … I can see that log message in 49 other tests, but can not get in this one!?!

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Created November 17, 2024 at 1:44 PM
Updated March 14, 2025 at 10:03 AM
Resolved December 4, 2024 at 12:53 PM