AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
9.0.3 Store Settings has a .Save() method??
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
I thought the whole design of AC9 was built around repositories doing all the save/load work? In the admin StoreController, I came across this: Code:
store.Settings.Save();
_storeRepo.Save(store);
Shouldn't settings be saved using an IStoreSettingsRepository object? Or a different question, wouldn't saving the Store object cascade down and automatically save the child collection of settings since the collection would be dirty? Or is this just a leftover that got missed during code conversion to MVC?
|
|
|
|
Rank: Administration
Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered Joined: 10/5/2018(UTC) Posts: 175
Thanks: 8 times Was thanked: 17 time(s) in 15 post(s)
|
The repositories were added for domain objects which had corresponding database tables. The settings property in store is a manager class wrapper written around store object to provide easy and efficient access on settings. The method remained the same since it was not a business object corresponding to table mapped hibernate entity.
|
1 user thanked mazhar for this useful post.
|
|
|
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
I get it. That makes sense now, thank you.
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
9.0.3 Store Settings has a .Save() method??
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close