book
Article ID: KB0084251
calendar_today
Updated On:
Description
Required actions after adding a new Concept property and backing store enabled (Persistence type "SharedAll")
Issue/Introduction
When you add a new property to a concept for which persistence is enabled, you need to take specific actions so that the change is reflected in the DB schema.
Resolution
If Backing store is enabled for the concept and you add a new field to the concept, it is required to update the backing store table for the concept to reflect the change.
To create the SQL script to update the backing store, execute the JDBC deployment and connect it to the existing backingstore.
Studio Menu File -> Export -> TIBCO BusinessEvents -> JDBC Deployment -> Select CDD file, output directory and file name -> Button Next (to open migration dialog).
It will create the <name>_alter.sql script that needs to be executed to update the database.
Sample alter.sql script (added new string property "prop2" to concept testCpt)
========================================================
--**********************************************************************
-- TIBCO BusinessEvents 5.3.0.196 (2016-10-25)
-- Using arguments :-c D:/temp/wsT5/TestSupport/teste.cdd -o d:\temp\sqls\sqls -d oracle -ansi true
-- Copyright(c) 2004-2016 TIBCO Software Inc. All rights reserved.
--**********************************************************************
ALTER TABLE D_testCpt ADD ( prop2 char varying(255) );
DELETE ClassToTable;
INSERT INTO ClassToTable(classname, tablename) VALUES ('be.gen.testFolder1.Order.testCpt', 'D_testCpt');
INSERT INTO ClassToTable(classname, fieldName, tablename) VALUES ('be.gen.testFolder1.Order.testCpt', 'rrf$', 'D_testCpt_rrf$');
INSERT INTO ClassToTable(classname, tablename) VALUES ('be.gen.testFolder1.Order.testCpt$testCpt$testSM', 'D_testCpt$testSM');
INSERT INTO ClassToTable(classname, fieldName, tablename) VALUES ('be.gen.testFolder1.Order.testCpt$testCpt$testSM', 'rrf$', 'D_testCpt$testSM_rrf$');
DELETE BEAliases;
INSERT INTO BEAliases VALUES ('COLUMN.End.alias', 'end_');
INSERT INTO BEAliases VALUES ('COLUMN.Start.alias', 'start_');
COMMIT;
=========================================================================
Note:
The CDD settings for the concept (Override section -> Cluster Cache settings) are used only to create the JDBC scripts (update lenght of string fields, default 255) and on startup to add indexes for the Space of the Concept in TIBCO ActiveSpaces metaspace. It is not related to the Space initialization (field definitions) at runtime, Here the concept definitions used. After update the Concept (add/delete concept) and CDD override section for the Concept will be updated automatically when open the CDD file in Studio.