Toad World® Forums

Modify entity object in gallery


#1

Hi all,

Is there a way to modify an object in my gallery? For example, adding in an After Script to an entity in a gallery object.

Also, I need to add table spaces to my gallery so entities can use them as defaults. Is it best to add the table space to the gallery object that contains the entity? Is it possible to add child objects to an existing gallery object?

If possible, I’d like to do this so that the objects in my model can be updated once the gallery object is updated.

Thanks a lot.

Cheers,

Nick


#2

Hello Nick,

Let me answer your questions one by one:

1) Is there a way to modify an object in my gallery?

Unfortunately not. You can modify the object on Workspace and then put it back to Gallery.

2) Is it best to add the table space to the gallery object that contains the entity?

One gallery item may contain multiple objects, but you cannot edit those objects or add another object to the Gallery item.

If I understand correctly, you would like to bundle a tablespace and several entities that have the tablespace assigned together. This is actually possible, try this:

  • I have created a Tablespace and five Entities. All of them have the Tablespace assigned.

  • Select all the Entities and the Tablespace in Model Explorer.

  • Right-click and select Add Object to Gallery | New Gallery or any already created gallery**.**

gallery5.png

  • All of the objects have been added to one Gallery item.

  • Open the target model, right-click the Gallery item and select **Add to Active Model **(this is the only way to add multiple objects of different types to the model).
    gallery7.png

  • The Entities and the Tablespace have been added to the Model (they can be found in Model Explorer). All the Entities have the same Tablespace assigned.
    3) Is it possible to add child objects to an existing gallery object

I know what you’re thinking, but unfortunately Gallery items do not work like that. You can only create Folders to organize your Gallery items.

4) If possible, I’d like to do this so that the objects in my model can be updated once the gallery object is updated.

As explained before, you cannot edit objects in Gallery, which means this is not possible.

I hope the described workaround will be enough for your purposes. If you have any more questions, go on and ask.

Regards,

Lukas


#3

Hi Lukas,

Thank you for your swift reply! From your response:

  • Would it be possible to add in the editing of gallery objects in the future? I think it would be a very useful feature.

  • When I add the grouped table space/entity to the model multiple times, the table spaces keep getting added even when they’re already present. Is there a way for this not to happen? If not, I’ll just keep them separate and have to remember to add at the start.

Cheers,

Nick


#4

We once considered the possibility of editing objects in gallery, but after doing some analysis, it was clear that it would take way too much time and effort to implement. So we don’t have such plans in the near future.

I don’t think there is a way to prevent adding multiple Tablespaces to Model in your situation. You can add the Entities and the Tablespace to Gallery separately. Just don’t forget to add the Tablespace to Model first. When you add the Entities first, they will not have any Tablespace assigned since there won’t be one in the Model yet.