You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Spring supports POJO classes without accessors (getter/setter) with just public fields, aka. anamic classes. While anemic classes are contraversial issue, Spring and all relates other libraries do support them so for this to be compatible and follow Spring convention, so should this library support them.
Describe the solution you'd like
Support Entity class annotated public fields without accessor methods. Like Spring Data (REST) does.
Describe alternatives you've considered
Document clearly that anemic classes are not supported with this library.
Additional context
Anemic classes are contraversial but there is school of though that they are ok in Entity classes as those should NOT contain any business logic. So them being anamic and immutable would be ideal. Unfortunately it is difficult or even impossible to make them immutable (to make fields public final) so all of the solutions are helf measures. And since there is no clear universal convention on this, it would be nice to support commonly accepted best practices. Even if their schools of though are at war each others. Some - like myself - think that anemic entity classes are smaller antipatterns than contaminating whole project with Lombok.
The text was updated successfully, but these errors were encountered:
This is a bit of a controversial topic and this is the first time anyone has raised it, I think. So, most users probably aren't following this pattern. That said I can look into what it would take to support. If it is not that much then I'd be fine adding it to bring closer to official Spring projects.
Like I said the fuctionality itself is bit of contraversial. Main reason this should be supported is to be in-line with Spring, as they suport this. But this is not high priority feature request.
Is your feature request related to a problem? Please describe.
Spring supports POJO classes without accessors (getter/setter) with just public fields, aka. anamic classes. While anemic classes are contraversial issue, Spring and all relates other libraries do support them so for this to be compatible and follow Spring convention, so should this library support them.
Describe the solution you'd like
Support Entity class annotated public fields without accessor methods. Like Spring Data (REST) does.
Describe alternatives you've considered
Document clearly that anemic classes are not supported with this library.
Additional context
Anemic classes are contraversial but there is school of though that they are ok in Entity classes as those should NOT contain any business logic. So them being anamic and immutable would be ideal. Unfortunately it is difficult or even impossible to make them immutable (to make fields public final) so all of the solutions are helf measures. And since there is no clear universal convention on this, it would be nice to support commonly accepted best practices. Even if their schools of though are at war each others. Some - like myself - think that anemic entity classes are smaller antipatterns than contaminating whole project with Lombok.
The text was updated successfully, but these errors were encountered: