# About Entity Properties -\> Attributes tab

**URL:** <https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059>\
**Category:** Toad Data Modeler\
**Created:** [June 7, 2007, 3:57pm UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059 "2007-06-07T15:57:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@Chi](https://forums.toadworld.com/u/Chi)\
**Post date:** [June 7, 2007, 3:57pm UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/1 "2007-06-07T15:57:01Z")

</div>

Hi

I am wondering if it is possible to allow user to set the data-type to auto-increment on the Data-type field?

I would be grateful if you could provide extra feature to allow user to set the primary it by clicking on the key field,

in some situation E.g. some table would have several primary key, if the above feature will be available, i would be grateful if the user is allow to highlight multi-row and set the primary key from Attributes tab as well.

I understood that we are able to setup primary key on “KEY” tab and change the key name as well, I think the feature that I suggest would be good to have as well, as the default key name could be PK\_fieldName or PK\_tableName …etc

Please let me know if you want me to explain more. = )

Many thanks

Chi

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [June 8, 2007, 4:43am UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/2 "2007-06-08T04:43:27Z")

</div>

Hello Chi,

> I am wondering if it is possible to allow user to set the data-type to auto-increment on the Data-type field?

Autoincrement can be set in the **Attribute Properties** dialog | **Identity** tab (for SQL Server db).

> I would be grateful if you could provide extra feature to allow user to set the primary it by clicking on the key field,...and set the primary key from Attributes tab as well.

Yes, we've already thought about this. To the existing method, we will add also another way how to assign attribute a PK easier and quicker.  
Anyway, your suggestion will be also considered. CR # 33 525.

Regards,

Vladka

---

<div class="post-metadata">

**Author:** ![Chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@Chi](https://forums.toadworld.com/u/Chi)\
**Post date:** [June 8, 2007, 4:55am UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/3 "2007-06-08T04:55:30Z")

</div>

\<\<Autoincrement can be set in the **Attribute Properties** dialog | **Identity** tab (for SQL Server db).\>\>

Yeah, I understand that we can set autoincrement on Attribute properties, I would be grateful to have an extra data type for auto\_increment on “Entity Properties” -\> Attribute tab. Then we do not need to go to Attribute Properties at all just for Auto increment.

Many thanks

Chi

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [June 8, 2007, 6:19am UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/4 "2007-06-08T06:19:20Z")

</div>

Hi,

> I would be grateful to have an extra data type for auto\_increment on "Entity Properties" -\> Attribute tab. Then we do not need to go to Attribute Properties at all just for Auto increment.

Welll, autoincrement is not a data type and therefore we think it shouldn't be among data types.  
Nevertheless, we've have a tip for you so as not to go to Attribute Properties just for auto increment:

1. Create a domain ( **Model** | **Domains** | **Add** ).
2. Define properties of the domain, including auto increment. - See the **Identity** tab of the Domain Properties dialog.
3. Confirm.

Now you can select the domain from the data type combo-box directly on the Attributes tab of an entity.

This might help you.

Regards,

Vladka & TDM Team

---

<div class="post-metadata">

**Author:** ![Michael.Rossdaughert](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Michael.Rossdaughert](https://forums.toadworld.com/u/Michael.Rossdaughert)\
**Post date:** [November 15, 2007, 2:53pm UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/5 "2007-11-15T14:53:46Z")

</div>

The issue I am having with this workaround is that now Identity properties are set with the domain. Now, when I create a relationship with another entity, the identity is copied over. I have to individually override the identity for that attribute in the child entity.

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [November 16, 2007, 6:43am UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/6 "2007-11-16T06:43:52Z")

</div>

Hello Michael,

Yes, this is how it works in TDM3 . - If you use the domain, create a relationship then, the identity is copied over automatically.

> I have to individually override the identity for that attribute in the child entity.

We have a solution for you. 🙂  
My co-worker Mario has written a script for you. - Please see the attachment.  
The script will go through all FK attributes and will automatically select the checkbox Override Identity. (So, you will not have to do it for each attribute individually. 😉 )

Please run the script in the Scripting Window (Tools | Scripting Window, see the Execute button in the Scripting Window toolbar.)

After you execute the script, take a look at the Log window where all entities and attributes where the checkbox was selected will be written out.

If you have any questions, please write use back.

Regards,

Vladka + Mario  
[Override\_Identity\_Script.txt](https://forums.toadworld.com/uploads/default/original/2X/e/ec21e4753546aaac26161650be9118691541d060.txt) (739 Bytes)

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [November 16, 2007, 7:25am UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/7 "2007-11-16T07:25:02Z")

</div>

Hi Michael again,

Just a note to the script. Please see:

var Model = app.Models.GetObject(3);  
… parameter in GetObject determines with which model the script should work. 0 = first model listed in the Application View, 1 = second model listed in the Application View etc.

The script is also available in the Scripts section in Library:  
[http://modeling.inside.quest.com/entry.jspa?externalID=1311&categoryID=35](http://modeling.inside.quest.com/entry.jspa?externalID=1311&categoryID=35)

Regards,

Vladka

---

<div class="post-metadata">

**Author:** ![Michael.Rossdaughert](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Michael.Rossdaughert](https://forums.toadworld.com/u/Michael.Rossdaughert)\
**Post date:** [March 20, 2008, 3:34pm UTC](https://forums.toadworld.com/t/about-entity-properties-attributes-tab/1059/8 "2008-03-20T15:34:22Z")

</div>

BTW, thank you.
