Skip to content

Conversation

@Christopher-Chianelli
Copy link
Contributor

Fixes #1951

@triceo
Copy link
Collaborator

triceo commented Nov 27, 2025

This is very brittle; it's not reasonable to expect that people will remember to add every new field here as well. Case in point: I believe we also introduced the comparator on list variable.

Surely we can reflect over the annotations and detect those fields? These annotations are public API; any field we find is user-facing.

@Christopher-Chianelli
Copy link
Contributor Author

This is very brittle; it's not reasonable to expect that people will remember to add every new field here as well. Case in point: I believe we also introduced the comparator on list variable.

Surely we can reflect over the annotations and detect those fields? These annotations are public API; any field we find is user-facing.

I have mixed feelings on this: in theory, we could add an annotation method that return a class that is not a bean, although we haven't yet. Additionally, when a new Annotation class is added, it still need to be added to DotNames (in particular, some annotations define member accessors, and others define planning entities; we cannot deduce that info from an annotation class).

Copy link
Collaborator

@triceo triceo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it is not perfect. Especially the fact that new annotations still need to be manually added. But IMO it is an improvement over status quo.

@sonarqubecloud
Copy link

@triceo triceo merged commit 927ecba into TimefoldAI:main Nov 27, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native build fails when using comparatorClass in @PlanningEntity

2 participants