cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable linking between entity attributes

marcveser
Employee
Employee
0 Kudos

Hi,

I'm currently designing a db model in power designer. I have added attributes with the same name to different entities (e.g. attribute product_uuid as key). Now I decided to rename the attribute in one entity to "business_entity_uuid". Curiously this also changed the name of the other attribute. They seem to be linked to each other or reference to the same attribute. Is there a possibility to disable this referencing to ensure that renaming in one entity doesn't cause changes in another entity?

Regards,

Marc

Accepted Solutions (1)

Accepted Solutions (1)

GeorgeMcGeachie
Active Contributor
0 Kudos

There are two possibilities here.

  1. your model is a CDM, and the two attributes are based on the same Data Item - a change to an attribute name is actually a change to the Data Item name, and will affect every attribute that references that Data Item
  2. your model is a LDM, and there is a relationship between the two entities. Renaming the identifying attribute of the parent entity would change the name of the FK attribute as well
GeorgeMcGeachie
Active Contributor
0 Kudos

There is a less likely alternative:

  • one or both of the attributes are replicas - check via the Dependencies tab (a replicated attribute), impact and lineage analysis, or via the Version tab (a replica attribute)
marcveser
Employee
Employee
0 Kudos

Hi George,

first of all thank you for the quick response. My model is a CDM (at least the file extension is .cdm). How can I avoid that two attributes are basend on the same data item. I only want the model for design not for any code or model generation. Therefore I don't need and I don't want automatic linking to the same data items.

Regards,

Marc

marc_ledier
Active Participant
0 Kudos

Hi Marc,

You can change the behavior by changing you rmodel options.

Check Tools > Model options.

In the Data Item group, you uncheck the Unique Code and Allow Reuse.

After that, you will be able to have data item with same name and code.

Marc

GeorgeMcGeachie
Active Contributor
0 Kudos

It won't let you disable reuse until you've removed the existing reuse. Run the model check, ensuring you select 'Data Item Used multiple times'

marcveser
Employee
Employee
0 Kudos

Hi Marc 🙂

thanks for the tip. Unfortunately it's not possible to uncheck "Allow Reuse" for my model since I'm already reusing data items. Is there a possibility to unshare shared data items and to generate copies for those data items instead. Or how can I control which data item is referenced when creating new or changing existing attributes?

Regards,

Marc

GeorgeMcGeachie
Active Contributor
0 Kudos

If you only have a few reused Data Items, you could sort them out manually. If you have many reused attributes, you could:

  • export all Entity Attributes to Excel, delete all Data Items from the model, change the model options, then re-import the Attributes from Excel

If you're OK with simple extensions, you could create a computed Extended Attribute on Data Item to hold the value of obj.Attributes.Count (this is the number of attributes that reference a Data Item). Include this and the property ' Used By' in a list of Data Items to enable you to see which entities use a Data Item and how many times each Data Item is used. This should be useful for filtering the list.

Once your new model options are in force, PD will automatically add one Data Item per attribute. When editing a list of Attributes, use the 'add Data Item' button to copy an existing Data Item / Attribute.

marcveser
Employee
Employee
0 Kudos

Hi George,

is there a global function to export all entity attributes to Excel or do I have to export the attributes for each entity by opening the entity properties, tab Attributes and clicking on export to Excel?

Regards,

Marc

former_member185317
Active Participant
0 Kudos

Hi Marc,

To export all you data items you can use the Model menu, Data Items and then use the filter buttons on the top of the dialog to choose which attributes you want to export and click the Excel button once you have done that.

To export all the Entity Attributes, go to the Report menu, choose List Report Wizard. Then for the Object Type, choose Entity Attribute and click Next. Then choose Name, Parent Name and any other attributes like Data Type, etc. Then click Next, Next, Next (Step 5/5) and then select the check box to "Generate the list report to an external file" and choose CSV.

HTH,

-Matt C.

Answers (0)