Dynamic data store strange problem

Vote:
 

I had a simple poco class which only contains a set of primitive type properties. According to online documentation, "All properties that cannot be mapped inline or as a collection (plus the EPiServer.Data.Dynamic.PropertyBag type) are mapped as references", as far as I can see all my properties are inline type, why it still creates the subtype and a link row is added in the reference table to link the parent data? 

 

[EPiServerDataStore(AutomaticallyCreateStore = true, AutomaticallyRemapStore = true)]
    public class Student: IDynamicData
    {
        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>
        /// The id.
        /// </value>
        public Identity Id { get; set; }

        /// <summary>
        /// Gets or sets the first name.
        /// </summary>
        /// <value>
        /// The first name.
        /// </value>
        public string FirstName { get; set; }

        /// <summary>
        /// Gets or sets the last name.
        /// </summary>
        /// <value>
        /// The last name.
        /// </value>
        public string LastName { get; set; }

        /// <summary>
        /// Gets or sets the email address.
        /// </summary>
        /// <value>
        /// The email address.
        /// </value>
        public string EmailAddress { get; set; }

        /// <summary>
        /// Gets or sets the phone.
        /// </summary>
        /// <value>
        /// The phone.
        /// </value>
        public string Phone { get; set; }

        /// <summary>
        /// Gets or sets the gender.
        /// </summary>
        /// <value>
        /// The gender.
        /// </value>
        public string Gender { get; set; }

        /// <summary>
        /// Gets or sets the DOB.
        /// </summary>
        /// <value>
        /// The DOB.
        /// </value>
        public DateTime DOB { get; set; }

        ........... few string properties
    }

    

#58007
Apr 10, 2012 16:22
Vote:
 

can someone give me an answer?

#58102
Apr 13, 2012 2:24
Vote:
 

Do you have more than 10 properties? Might be that one row is not enough in the bigtable to store all properties (or that you have too many string properties). Are you only curious about this or do you have any problems when retrieving the data?

Frederik

#58228
Apr 13, 2012 13:36
Vote:
 

What Subtype is created?
Perhaps you are seeing some other class that has references to Students, for example a "Class" class which has a List<Student> ?

The Student class you presented above should not get anything stored in tblBigTableReference.

/johan

 

#58232
Apr 13, 2012 14:33
Vote:
 

Hi Frederik

You are right I am having more than 10 properties in the class, but how do you know bigtable will create another reference row if the class has more than 10 properties (that's the thing I disklike the CMS which has a lot of hidden stuffs in it without proper documentation)? I don't have any problem regarding to create another reference row (just a little bit concern about the performance). 

#58250
Apr 16, 2012 5:52
Vote:
 

The bigtable only has x columns of each type (you can easily see how many in the schema) and you seem to have a lot of string properties so you probably hit the limit of varchar fields available so it has to span multiple rows. This is probably what Frederik meant, just wanted to clarify that it is dependent on the type of data.

#58252
Apr 16, 2012 10:03
Vote:
 

@vincent yang

Direct from the DDS Tech note:

"You may add and remove columns in this table to suit the type of data you are saving. This may be particularly useful if you know you are going to store a data type with more than say 10 strings for example. By default the 11th to 20th strings would be stored in a 2nd row for the type which means a join has to be done at runtime when reading the data. By adding String11, String12 etc to the ‘big table’ you limit the chance of a row overspill and therefore increase performance. If you require more indexes then add columns with names starting with 'Indexed' and ensure an index is created on them."

Maybe you can read the proper documentation before claiming it doesn't exist

http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-6-R2/Dynamic-Data-Store/


#58259
Apr 16, 2012 13:13
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.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.