More in this section
Forums / Sitefinity SDK / Adding field to module (after module is already registered)

Adding field to module (after module is already registered)

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. higgsy
    higgsy avatar
    336 posts
    05 Aug 2010
    28 Apr 2011
    Link to this post

    I have developed an OpenAccess module for case studies. I have registered it in my sitefinity web app and everything is running nicely - however I now need to add a field to it, not a custom field added via the UI, but a physical coded field.

    Can I do this without first unregistering the module? If so, how do I do this seeing as there is no built-in method?

    Likewise, over the next few days Im looking to upgrade to 4.1 and I know I need to make changes to the mapping of persistent classes - again, will I need to unregister my module first?

  2. Nikolay Datchev
    Nikolay Datchev avatar
    87 posts
    01 Nov 2016
    03 May 2011
    Link to this post
    Hello higgsy,

    You don't need to un-register your module to introduce new code based custom fields. This is valid for both 4.0 and 4.1. I strongly suggest to first migrate your module to 4.1 since we will not be able to support problems with the 4.0 modules from now on and the ORM mapping is completly changed.
    How this works in 4.1: Once you change dll-s of your module and restart sitefinity, upon intialization of your open access data provider, sitefintiy checks the build numbers of the assemblies that incude persistent classes mapped in your provider. If these build numbers have changed from the pervious initalization - it will test the database for consitency versus the new ORM model and if necessary upgrade - add columns, tables, indecies etc.. Hence if you add new fields and ORM mappings to your module you simply have to make a build of your module assembly with higher version than the previous ,copy the binaries in bin and restart sitefinity.

    Best wishes,
    Nikolay Datchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

2 posts, 0 answered