Skip to main content
7-Bedrock
September 9, 2026
Solved

Changing ThingTemplate of a ThingTemplate which inheriteds +20k Devices

  • September 9, 2026
  • 2 replies
  • 78 views

Hey everyone,

we know already that changing ThingTemplate for an existing BaseThingTemplate is not possible through composer and there exists some topics that suggest to modify the XML file in order to be able to change this. However this only works on “unsealed” extension and not for already sealed ones (isExtension=true, isEditableExtensionObject=false)

We know came across changing the baseThingTemplate Type in the Database directly. e.g. through the following query: 

 UPDATE
thingworx.thingtemplate_model
SET
"baseThingTemplate" = 'RemoteThingWithFileTransfer'
WHERE
"name" = 'BaseThingTemplate';

We definitely know this is not the supported way to go but we also didn’t find any other solution which makes a change possible other then having to recreate all 20k+ devices again which means a lot of migration effort.

Therefor I wanted to ask if you see any downside or potential risk here performing this. Obviously this change takes only affect after rebooting Thingworx and also modifying the entities in that extension by uploading a newer version of it having the change intus also. In our tests it worked.

Thanks for answering,

Vincenzo

Best answer by vcrimi

So after having discussed this part with the technical support team we found out via testing that it is better to do the following approach:

  • Modify aspect for isEditableExtensionObject to true for the ThingTemplate you want to change the template
INSERT INTO public.aspect_model(entity_name, entity_type, key, value) VALUES ('MyBaseTemplate', 1301, 'aspect.isEditableExtensionObject', 'true'); 
  • Restart Thingworx
  • Import modified version of the ThingTemplate having the new ThingTemplate as base (be carefull also on the effictiveThingPackage to have the correct Package there. For us it was: RemoteThingWithFileTransfer
  • Change the thingtemplate aspect back again to be sealed:
DELETE FROM thingworx.aspect_model WHERE entity_name = 'MyBaseTemplate' and key = 'aspect.isEditableExtensionObject'
  • Restart Thingworx again
  • Verify change did apply on the things (also via exporting for source control).
  • Import an sealed Extension that contains the changed template (with newer version of the Extension)
  • Restart Thingworx again
  • Verify the logs and run some SmokeTests (Modifying existing Asset Properties, Events, ...) Creating new Assets derived from that Template.

We assume that this is somehow at least doing a basic validation on the model before something brakes, but we cannot tell for sure.

WARNING: Again this is not a officially supported way! It is just based on our experiance what we did. It might be different in your case, so stay cautioned and if it is a production system contact technical support team first!

Hope this helps until Thingworx brings a feature that allows us to do the changes directly without a hack.

2 replies

Support
September 16, 2026

Hello ​@vcrimi,

 

I hope you are doing well!

 

I think it is not currently possible to change the implemented ThingTemplate, in Composer, for a Thing entity after it has been created and saved. For more information, please refer to this KB article.

 

While the SQL update may appear to work in a test environment, I would be very cautious about recommending it for production.

 

The main concern is not only the thingtemplate_model.baseThingTemplate value itself, but also all the metadata, inheritance relationships, model caches, and future extension validation that ThingWorx maintains internally. Direct database modifications bypass the platform's model validation logic, so there is no guarantee that all dependent entities remain consistent after:

  • Platform restart
  • Entity validation during import/export
  • Platform upgrades or migrations
  • Extension upgrades
  • Model indexing/rebuild operations

In your scenario, the risk is amplified because the template is inherited by 20k+ Things. Even if the change appears successful initially, an inconsistency discovered later could be very difficult to remediate at scale.

 

From a support perspective, Support team would likely consider direct database modifications an unsupported customization, which could complicate troubleshooting of future issues.

 

If this is a production system, I would strongly recommend opening a case with Technical Support and requesting guidance or an officially supported migration approach. 

 

 

Regards,

Abhi 

vcrimi7-BedrockAuthorAnswer
7-Bedrock
September 18, 2026

So after having discussed this part with the technical support team we found out via testing that it is better to do the following approach:

  • Modify aspect for isEditableExtensionObject to true for the ThingTemplate you want to change the template
INSERT INTO public.aspect_model(entity_name, entity_type, key, value) VALUES ('MyBaseTemplate', 1301, 'aspect.isEditableExtensionObject', 'true'); 
  • Restart Thingworx
  • Import modified version of the ThingTemplate having the new ThingTemplate as base (be carefull also on the effictiveThingPackage to have the correct Package there. For us it was: RemoteThingWithFileTransfer
  • Change the thingtemplate aspect back again to be sealed:
DELETE FROM thingworx.aspect_model WHERE entity_name = 'MyBaseTemplate' and key = 'aspect.isEditableExtensionObject'
  • Restart Thingworx again
  • Verify change did apply on the things (also via exporting for source control).
  • Import an sealed Extension that contains the changed template (with newer version of the Extension)
  • Restart Thingworx again
  • Verify the logs and run some SmokeTests (Modifying existing Asset Properties, Events, ...) Creating new Assets derived from that Template.

We assume that this is somehow at least doing a basic validation on the model before something brakes, but we cannot tell for sure.

WARNING: Again this is not a officially supported way! It is just based on our experiance what we did. It might be different in your case, so stay cautioned and if it is a production system contact technical support team first!

Hope this helps until Thingworx brings a feature that allows us to do the changes directly without a hack.