test(user-mypage): explain Clear() + cover unparseable rotation entries
Add a comment above MyPageBgRotation.Clear() explaining the EF OwnsMany delete-on-clear semantics. Add a 7th test covering garbage/"" entries in mypage_id_list falling back to BgId=0 while adjacent valid entries are unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,8 @@ public sealed class UserMyPageController : SVSimController
|
||||
viewer.MyPageBgSelectType = request.SelectType;
|
||||
viewer.MyPageBgId = ParseIdOrZero(request.MyPageId);
|
||||
|
||||
// Clear() on a loaded OwnsMany marks every tracked entry as Deleted; SaveChangesAsync
|
||||
// issues DELETEs for all old slots before inserting the new ones.
|
||||
viewer.MyPageBgRotation.Clear();
|
||||
for (int slot = 0; slot < request.MyPageIdList.Count; slot++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user