November Happy Hour will be moved to Thursday December 5th.

smithsson68@gmail.com
Feb 14, 2011
  5778
(3 votes)

Dynamic Data Store : Easier Store Creation and Remapping (for CMS 6 R2)

We have received lots of good feedback about the Dynamic Data Store (DDS) since it’s launch with CMS 6 R1. However, one area that has caused a few problems and quite rightly a little criticism is the way to create / obtain and most critically, how to remap stores when you change your class definition (especially when they change often in the development phase).

With that said, there are some major improvements in this area in the upcoming R2 Wave release (CMS 6 R2, Community 4 R2 etc.)

EPiServerDataStoreAttribute

This is an existing attribute that could be applied to classes to tell the DDS the name of the store to save an instance of the class to when saved as part of an object graph. We have added a couple of new properties to this class.

AutomaticallyCreateStore

Setting this new boolean property to true means that you no longer need to worry if your store exists or not, it will be created on demand when GetStore is called!

AutomaticallyRemapStore

Setting this new boolean property to true means that you no longer need to worry if you change your class definition, the store’s definition will be automatically remapped to the class on demand when GetStore or CreateStore is called!

EPiServerDataPropertyRenameAttribute

This new attribute is used in combination with the AutomaticallyRemapStore property of the EPiServerDataStoreAttribute. Because the DDS uses reflection to discover what properties a class has, it cannot distinguish between renaming a property or removing a property and then adding a new one with a different name. For that reason, you should apply this attribute to a property when it’s name is changed to enable the property to be mapped to the existing values in the big table. Under the development phase, you may choose to skip this if it’s not important for your class to work with existing data is the class’ store.

An example of using the new functionality can be found here on the Code section of EPiServer World.

For existing development on CMS 6 R1 (and Community 4 R1), I will shortly be releasing an open source variant of the above which will give pretty much the same functionality. Watch this space!

Feb 14, 2011

Comments

Feb 15, 2011 09:52 AM

Dude. Sweet.

That's some great work! Thanks Paul & and the DDS team!

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog