Skip to main content
Question

Deleting Instance from a single container.

  • September 27, 2025
  • 5 replies
  • 74 views

Forum|alt.badge.img+2

Is there a way to delete the relationship between an instance and a container?
 

Let’s say I have a view Foo in one data model and another view FooExtension in another data model. FooExtension implements Foo.

I have an instance of externalId “FOO”, space: “FOO-DAT” that have data stored in both views/containers.

If it was no longer necessary to store data in container FooExtension is there a way to just delete this relationship in a way that `hasData(FooExtension)` from the DMS Query doesn’t find this instance anymore without affecting the data stored in Foo and the instance itself? 

Since instance count is limited, it’s becoming more common in our project modeling things having the mindset of shared instance when they mean the same thing across data models but with different formats to present the data on different Apps. But sometimes we don’t want to have the data in the app anymore and virtual deletion (boolean flags) is not always an option specially when the data volume is big. 

5 replies

Mithila Jayalath
Seasoned Practitioner
Forum|alt.badge.img+8

@Arild Eide will you be able to help out here?


Arild  Eide
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • October 3, 2025

Hi ​@Leandro de Lima Almeida 

 

I am not confident that I read your use-case correctly. But in general: 

  • Deleting an instance will remove its instance id (space, externalId) and all its properties.
  • You can certainly create a new view Foo and apply a view filter that filters out FooExtension data (for instance a negated exists filter on a property or a hasData filter (if there are any required properties)
  • Deleting the FooExtension container will delete property values for all instances, if this is acceptable you can do so and update the view filter using a hasData on the Foo container. Instances and property values in the Foo container will be retained.

Hope this helps. Let us know if not.

 

Regards 

 

Arild Eide

 


Forum|alt.badge.img+2

Hi Arild and Mithila,

Thank you for the explanation — I appreciate the details you shared. I realize I may not have expressed my question clearly, as I was hoping to explore something a little different from what’s in the documentation.

I’ve included the diagram below to help illustrate what I’m trying to achieve.

(edit)
I think the answer will be the same, but the question is the same for the view with implements.


Arild  Eide
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • October 6, 2025

Hi again ​@Leandro de Lima Almeida 

When you write the (ABC,123) instance through ViewC this instance will have data in the containers mapped by ViewC. There is no way to delete an instance’s data for certain containers only. If you read the instance throug a view that does not map any property from Container C these properties will not be exposed to the client.

Alternatively, you may consider deleting and recreating the instance.

 

Arild 


This would be a very useful feature for us in Aker Solutions as well. We have at times a need remove an instance from a view, but keep it in another. As of now, we cannot do this. I assume this would be done by nulling out all values of properties in the view, but we do not have any tools to do this.