VCST-4710: Add AddressService and AddressSearchService#293
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Autofix Details
Bugbot Autofix prepared fixes for all 3 issues found in the latest run.
- ✅ Fixed:
FromModelignoresPrimaryKeyResolvingMapbreaking entity-model ID mapping- Updated
AddressEntity.FromModel(Address, PrimaryKeyResolvingMap)to register the model-entity pair viapkMap?.AddPair(model, this)before mapping fields.
- Updated
- ✅ Fixed: Lazy getter caches stale scalar value in search criteria
- Changed scalar setters in
AddressSearchCriteria(MemberId,RegionId,CountryCode,City) to clear their cached list fields so list getters reflect later scalar updates.
- Changed scalar setters in
- ✅ Fixed:
DeleteAsyncnot blocked on read-only address service- Overrode
AddressService.DeleteAsync(IList<string>, bool)to throwNotImplementedException, matching the service’s read-only contract.
- Overrode
Or push these changes by commenting:
@cursor push 7151dfb5af
Preview (7151dfb5af)
diff --git a/src/VirtoCommerce.CustomerModule.Core/Model/Search/AddressSearchCriteria.cs b/src/VirtoCommerce.CustomerModule.Core/Model/Search/AddressSearchCriteria.cs
--- a/src/VirtoCommerce.CustomerModule.Core/Model/Search/AddressSearchCriteria.cs
+++ b/src/VirtoCommerce.CustomerModule.Core/Model/Search/AddressSearchCriteria.cs
@@ -5,7 +5,19 @@
public class AddressSearchCriteria : SearchCriteriaBase
{
- public string MemberId { get; set; }
+ private string _memberId;
+ public string MemberId
+ {
+ get => _memberId;
+ set
+ {
+ if (_memberId != value)
+ {
+ _memberId = value;
+ _membersIds = null;
+ }
+ }
+ }
private IList<string> _membersIds;
public IList<string> MembersIds
@@ -24,7 +36,19 @@
}
}
- public string RegionId { get; set; }
+ private string _regionId;
+ public string RegionId
+ {
+ get => _regionId;
+ set
+ {
+ if (_regionId != value)
+ {
+ _regionId = value;
+ _regionIds = null;
+ }
+ }
+ }
private IList<string> _regionIds;
public IList<string> RegionIds
@@ -44,7 +68,19 @@
}
- public string CountryCode { get; set; }
+ private string _countryCode;
+ public string CountryCode
+ {
+ get => _countryCode;
+ set
+ {
+ if (_countryCode != value)
+ {
+ _countryCode = value;
+ _countryCodes = null;
+ }
+ }
+ }
private IList<string> _countryCodes;
public IList<string> CountryCodes
@@ -63,7 +99,19 @@
}
}
- public string City { get; set; }
+ private string _city;
+ public string City
+ {
+ get => _city;
+ set
+ {
+ if (_city != value)
+ {
+ _city = value;
+ _cities = null;
+ }
+ }
+ }
private IList<string> _cities;
diff --git a/src/VirtoCommerce.CustomerModule.Data/Model/AddressEntity.cs b/src/VirtoCommerce.CustomerModule.Data/Model/AddressEntity.cs
--- a/src/VirtoCommerce.CustomerModule.Data/Model/AddressEntity.cs
+++ b/src/VirtoCommerce.CustomerModule.Data/Model/AddressEntity.cs
@@ -147,6 +147,7 @@
public AddressEntity FromModel(Address model, PrimaryKeyResolvingMap pkMap)
{
+ pkMap?.AddPair(model, this);
return FromModel(model);
}
diff --git a/src/VirtoCommerce.CustomerModule.Data/Services/AddressService.cs b/src/VirtoCommerce.CustomerModule.Data/Services/AddressService.cs
--- a/src/VirtoCommerce.CustomerModule.Data/Services/AddressService.cs
+++ b/src/VirtoCommerce.CustomerModule.Data/Services/AddressService.cs
@@ -30,4 +30,9 @@
{
throw new NotImplementedException("This service is read-only. Save addresses via the Member entity.");
}
+
+ public override Task DeleteAsync(IList<string> ids, bool softDelete)
+ {
+ throw new NotImplementedException("This service is read-only. Delete addresses via the Member entity.");
+ }
}
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.993
Timestamp: 10-03-2026T10:29:34
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.91
Timestamp: 10-03-2026T12:31:16
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.718
Timestamp: 11-03-2026T08:52:48
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.832
Timestamp: 11-03-2026T09:13:39
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.743
Timestamp: 11-03-2026T10:06:34
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 8.98
Timestamp: 17-03-2026T12:33:20
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 8.111
Timestamp: 18-03-2026T08:32:45
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.926
Timestamp: 18-03-2026T09:18:09
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.427
Timestamp: 18-03-2026T10:37:22
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 8.242
Timestamp: 18-03-2026T11:12:38
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 8.135
Timestamp: 18-03-2026T17:06:40
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.982
Timestamp: 19-03-2026T14:57:39
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.712
Timestamp: 19-03-2026T17:26:34
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.898
Timestamp: 20-03-2026T10:53:36
|
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.632
Timestamp: 20-03-2026T13:31:04
🧪 Katalon Test Report — ✅ PASSED
📋 Suite details
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 011f0d9. Configure here.
|





Description
References
QA-test:
Jira-link:
https://virtocommerce.atlassian.net/browse/VCST-4710
Artifact URL:
https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.Customer_3.1007.0-pr-293-1928.zip
Note
Medium Risk
Adds new search/faceting and caching invalidation paths that can impact query performance and cache correctness; also bumps core platform dependencies which may introduce subtle behavioral changes.
Overview
Introduces first-class address CRUD/search APIs:
IAddressService(read-onlyCrudServicewrapper) andIAddressSearchServicewith newAddressSearchCriteria/AddressSearchResultsupporting keyword + member/country/region/city filters, facet aggregation, and sorting by a virtualIsFavoritecolumn usingIFavoriteAddressService.Updates caching so address searches and favorites invalidate correctly when members or favorite addresses change, adds address change events, and extends repository/entity plumbing (
IMemberRepository.GetAddressesByIdsAsync,AddressEntityimplementingIDataEntity,AddressimplementingIEntity). Also bumps platform package references andmodule.manifestplatform version to3.1025.0, and wires the new services into DI.Reviewed by Cursor Bugbot for commit 1928592. Bugbot is set up for automated code reviews on this repo. Configure here.