MemberService.java updateMember - #68
Open
Allimonae wants to merge 2 commits into
Open
Conversation
|
Graphite Automations"Request reviewers once CI passes" took an action on this PR • (08/03/26)2 reviewers were added to this PR based on Henry Chen's automation. |
spiffyy99
reviewed
Aug 3, 2026
| @Email String email, | ||
| String linkedInUrl, | ||
| @NotBlank String introduction, | ||
| String introduction, |
spiffyy99
reviewed
Aug 3, 2026
| if (request.fullName() != null) { | ||
| member.setFullName(request.fullName()); | ||
| } | ||
| if (request.email() != null) { |
There was a problem hiding this comment.
i'd assume we wouldn't want to assign some of these to blanks either? I think spring has some utils for this
arklian
reviewed
Aug 3, 2026
| throw new MemberNotFoundException(id); | ||
| Member member = memberRepo.getMemberById(id).orElseThrow(() -> new MemberNotFoundException(id)); | ||
|
|
||
| if (request.fullName() != null) { |
Member
There was a problem hiding this comment.
How does this handle null vs empty in the string?
| void updateMember_successWithOnlyNameField() { | ||
| final UUID id = UUID.randomUUID(); | ||
| final UpdateMemberRequest request = | ||
| new UpdateMemberRequest("Updated Name", null, null, null, null, null, null, null, null); |
Member
There was a problem hiding this comment.
How does the controller serialize the JSON into nulls?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




MemberService
updateMemberImplementedThe
updateMembermethod now performs a true partial update instead of replacing the entire member object. Only fields provided in theUpdateMemberRequestthat are non-null will be applied to the existing member, preserving all other field values.@NotBlankhas been removed fromfullName,email, andintroductioninUpdateMemberRequestto allow partial updates.Test Coverage
MemberNotFoundExceptionwhen the member does not existfullName) while preserving all other existing valuesnull