Updating multiple entities with the same name in the same flush throws a ClassCastException when using a non-Comparable user type as the entity ID

Description

From what I can gather, this started happening when ActionQueue was updated to use the custom ExecutableLists (in 7bca11a5047e5346c10779d7d663e63f7c4ecb25 and, probably more importantly, 31ad26731c84e96d532755e1e45f1ffc4ae1674b.

When comparing EntityUpdateActions, if the entity name is the same, EntityAction tries to compare the identifiers, which will call AbstractType.compare(), which is going to blindly cast the possibly non-Comparable ID to Comparable and blow up all over the place.

Even if the behaviour is expected and there is a requirement which I don't know about that all user-type IDs should be Comparable, I guess it could inform the user of that right away when loading the type definitions instead of lying in wait until production

Test case attached.

Environment

None

Assignee

Gail Badner

Reporter

Timur Strekalov

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Critical
Configure