VCST-4710: Add AddressService and AddressSearchService#293
VCST-4710: Add AddressService and AddressSearchService#293ksavosteev wants to merge 17 commits intodevfrom
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
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.
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



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.1003.0-pr-293-fd7c.zip
Note
Medium Risk
Adds new address search/query surface (filtering, faceting, and favorite-based sorting) and introduces additional caching invalidation paths; also bumps multiple VirtoCommerce Platform package versions, which can have broader runtime impact.
Overview
Adds a dedicated read-only
AddressServiceplusAddressSearchServiceto retrieve and search customer addresses independently ofMember, including keyword/member filtering, faceted aggregation (country/region/city), and optional sorting by a computed favorite flag viaIFavoriteAddressService.Updates the data layer to support the new CRUD/search pipeline (address events,
Addressnow implementsIEntity,AddressEntityimplementsIDataEntityand repository addsGetAddresssByIdsAsync), and extendsMemberServicecache invalidation to expire address search/item cache tokens when members/addresses change.Bumps
VirtoCommerce.Platform.*package references and module manifestplatformVersionto3.1008.0-alpha.13210-vcst-4710, and registers the new services in DI.Written by Cursor Bugbot for commit fd7cae5. This will update automatically on new commits. Configure here.