Currently, all entities (models) are made as Java record types, but as @SeabertYuan 's pointed out, this will cause issues with PUT requests (updates), since Java record types are immutable.
So, this is the first step of the solution:
[ ] Essentially take the Java record types that are currently in the models/ folder, and convert them into classes (see Mock types for examples)
The second step is to create DTOs, which can actually be records, and map between DTOs and entities. I'll put that in a separate GitHub issue
Currently, all entities (models) are made as Java
record
types, but as @SeabertYuan 's pointed out, this will cause issues with PUT requests (updates), since Javarecord
types are immutable.So, this is the first step of the solution:
record
types that are currently in themodels/
folder, and convert them into classes (seeMock
types for examples)The second step is to create DTOs, which can actually be records, and map between DTOs and entities. I'll put that in a separate GitHub issue