Dynamic Data Store Remapping

Vote:
 

I'm facing a problem with remapping of objects stored in a Dynamic Data Store.

Lets say we have something like this:

    [EPiServerDataTable(TableName = "tblBigTableComment")]
    [EPiServerDataStore(AutomaticallyCreateStore = true, AutomaticallyRemapStore = true, StoreName = "CommentStore")]
    public class Comment
    {
        public Identity Id { get; set; }
        public int PageId { get; set; }
        public string CommentId { get; set; }
        public string UserName { get; set; }
        public string CommentText { get; set; }
        public DateTime Date { get; set; }
        public bool IsCommentDeleted { get; set; }
    }

Later on we want to add a new property to this Comment object. Lets say for instance:

public CommentType Type { get; set; }

When we then try save a new comment to the DDS we get this error:

The Type 'EonIntra.Web.Business.Entities.NotificationSettings' needs to be remapped in the Dynamic Data Store, see the Errors collection for more information.
Remapping can be done by applying the EPiServer.Data.Dynamic.EPiServerDataStoreAttribute attribute to the type,
setting its AutomaticallyRemapStore property to true and ensuring the <episerver.dataStore><dataStore> autoRemapStores attribute in web.config is set to true (or is not defined).
Alternatively call the Upgrade-EPiRemapDDSTypes cmdlet from Powershell.

 

Why doesn't the remapping work? We have decorated the comment object but it still wont remap. Any suggestions?

    

#74998
Sep 13, 2013 14:06
Vote:
 

I have several classes I've successfully remapped using attributes:

[EPiServerDataStore(AutomaticallyCreateStore = true, AutomaticallyRemapStore = true)]

    

Could it be the combination with the custom BigTable attribute? Try testing adding EPiServerDataColumn attributes to class properties, or removing the EPiServerDataTable attribute.

#75012
Sep 15, 2013 10:46
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.