Soft delete related issue

  • We have successfully added soft deletion to a table.
    image

The issue happens when we are trying to update a record that uses the soft deleted dimension value. After updating and changing to an existing value for that dimension, the record is not updating accordingly, but it keeps showing the soft deleted value.
image

while reload page it is gone it is not update new one.
image

Sorry, I didn’t understand.
What is “dimension value”?
How do you update it?
How do you reload the page? By reloading data?

  • There are two table one is Typology table and another is project table

  • typology table have soft-delete feature which I have attached image 1 previously .

  • project table have manyToOne realtion with typology.

  • I have added some record into typology.

  • Then come to project select value from typology dropdown.

  • After that come to typology delete same record which is selected previously.

  • Come to project try to update the another value from typology dropdown. record is not updating it is showning older deleting value (image 2) (1st problem is we can not update the typology value )
    another problem is deleted value which should not shown into UI. Once reload same page url then it do not show the deleted value.

This is how soft deletion works. See the docs:

In loaded entity graphs, soft-deleted instances are filtered out from collection attributes (To-Many references), but present in single-value attributes (To-One references).

Hello Konstantin, this is clear from our side.

Our doubt is mostly related to the fact that when updating a row which uses a dimension value (es. Client = “Client A” and Client A has been soft deleted from the entity Clients), it is not possible to edit the row to switch to another Client (es. “Client B” that is still existing in the entity Clients).

Is this behaviour intentional or is somehow a bug?

Thank you for you kind cooperation,

Best Regards

Hi Matteo,

Sorry, I’m lost again in your specific terminology.
Could you provide a simple test project with a couple of entities demonstrating the problem?

In general, a user should be able to change the value of a reference from a soft-deleted one to another.

Hi Konstantin,

please find attached documentation about the issue.

Looking forward for your kind feedback,

Regards
Steps to recreate the Soft Delete Bug.pdf (648.1 KB)

Hi Matteo,

Something is going wrong in your application.
The normal behavior of soft-deleted entities is as follows.

  • There are 2 entities: Foo and Bar, both soft-deletable. Foo has a reference to Bar (Foo.bar attribute).

  • Created 2 instances of each entity (foo1, foo2, bar1, bar2), foos reference bars.

  • bar1 is soft deleted.

  • Foo browser still shows the reference to it (as designed):
    image

  • Foo editor also shows the deleted reference, but it’s absent in the lookup list (again as designed):
    image

  • If I select bar2, it is saved as a new value of reference from foo to bar.

Attached the project:
demo.zip (89.6 KB)

Please check how you display and save the reference.

Thank you Konstantin,

I checked in another application and it works fine.

I confirm that Soft Delete works as expected (and it is what we were looking for).

Best Regards