Skip to content

OBGM-413 Unable to create a new user#4146

Merged
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from
OBGM-413-v2
Jul 7, 2023
Merged

OBGM-413 Unable to create a new user#4146
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from
OBGM-413-v2

Conversation

@kchelstowski
Copy link
Collaborator

According to discussions we had both here: #4093 and in the ticket for now I went the easiest path, so just to make the persistence in the service layer.
I think doing data binding in the controller is not that bad, since in spring we also use @RequestBody to do it for us, but eventually in the MVP1/2 we could follow path of creating DTOs for those, so to make

User createUser(BasicUserDTO user) {
  ...
}
...
class BasicUserDto {
  String firstName
  String lastName
  String email
}
User createUser(UserWithDetailsDto user) {
  ...
}
...
class UserWithDetailsDto extends BasicUserDto {
  Date dateOfBirth
  Locale locale
  ...
}

but user is specific case. But I believe this would be still a better approach instead of extracting a lot of params and passing it to the service etc.
I'm looking forward to discuss it in the future.

@awalkowiak awalkowiak merged commit b8f2401 into feature/upgrade-to-grails-3.3.10 Jul 7, 2023
@awalkowiak awalkowiak deleted the OBGM-413-v2 branch July 7, 2023 10:21
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.

2 participants