cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Add column utility should have option to prevent new columns from being added to subtype tables

0 Kudos

Add column utility should have option to prevent new columns from being added to subtype tables

Installed SIM on top of an existing Windchill system and found that SIM standard attributes are being added to WTPart, MPMPlant, MPMWorkCenter and MPMTooling tables.  SIM only uses the WTPart table.  The MPMLink tables will never use SIM attributes and shouldn't have had them added.  PTC reported that SIM uses the add column utility for adding additional columns, which adds the columns to the subtype tables by default.  As a result requesting that the add column utility have an option added to prevent the columns from being added to subtype tables.


More details can be found in the PTC Case C13678968.

7 Comments
RandyJones
19-Tanzanite

@mobrien wrote:

Installed SIM on top of an existing Windchill system and found that SIM standard attributes are being added to WTPart, MPMPlant, MPMWorkCenter and MPMTooling tables.  SIM only uses the WTPart table.  The MPMLink tables will never use SIM attributes and shouldn't have had them added.  PTC reported that SIM uses the add column utility for adding additional columns, which adds the columns to the subtype tables by default.  As a result requesting that the add column utility have an option added to prevent the columns from being added to subtype tables.


mpmplant, mpmworkcenter, and mpmtooling are NOT subtypes of wtpart

Subtypes of an object all exist in the same table as the subtyped object so adding columns will always add columns to the "subtype table". For example if you create a wtpart subtype and create a new object using this you will create one new row in the wtpartmaster table and one new row in the wtpart table.

mobrien
3-Visitor

Hello,

 

I'm attaching a photo from the type manager showing the mpmworkcenter type within the part. 

subtypes.jpg

 

My understanding is the approach for MPMLink was to create new tables for WTPart subtypes where other modules added them to the wtpart table.  Let me know if I'm misinterpretting the information.  Thanks

RandyJones
19-Tanzanite

You are correct! I do not have mpmlink installed here and did not realized that mpmlink used subtypes of wtpart.

 

However this part is still true: "Subtypes of an object all exist in the same table as the subtyped object so adding columns will always add columns to the "subtype table". For example if you create a wtpart subtype and create a new object using this you will create one new row in the wtpartmaster table and one new row in the wtpart table."

 

So there is no way for AddColumns.sh to  not add database columns for all subtypes of an object. That is not just the default behavior it is the only possible behavior. However these columns are simply ignored by the subtypes unless you define a custom attribute for the subtype (or its parent).

 

mobrien
3-Visitor

If I go into the database, I can see a table for mpmworkcenter (which I show a snapshot in the type manager in previous message).  The classname in the type manager screen matches the classnamea2a2 in the snapshot:

mpmworkcenter.jpg

 

As a result I believe the MPMLink handles subtypes differenlty.  Thanks

RandyJones
19-Tanzanite

I see. MpmLink subtypes are handled differently so your idea definitely has a point. However the default behavior is if you add a custom attribute to a parent type it is inherited by any child subtypes. Maybe this doesn't follow with mpmlink subtypes. You could try this (on a test server) by adding a custom attribute (standard) to your wtpart and see if it is inherited by the mpmlink subtypes.

If the new attribute is inherited then this behavior would need an option to prevent this in order for the AddColums.sh utility to also have an option.

mobrien
3-Visitor

Through research PTC did on C13678968, they discovered that the SIM install uses add columns utility to add the standard attributes to WTPart table which in turn resulted in the columns being added to mpmlink subtypes.  As a result, they recommended I add an enhancement request.  So I don't think more testing is required.  Thanks

olivierlp
Community Manager
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.