Developer forum

Forum » CMS - Standard features » Item relation list, inline, delete

Item relation list, inline, delete

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

We have upgraded one of our solutions from an old version to 9.14.10.

In the process, we have noticed a difference of behavior when deleting items from an ItemRelation list.

How to reproduce:

1. Create an Item type for ItemList (does not matter how many fields you add)

2. Create an ItemType to be used as page or paragraph. Add a field of type "Item relation list", select the Item created in step 1 (or any Item type that is suitable for lists) and select "Inline" for Item Source.

3. Create an instance of the Item created in step #2 and start adding elements.

You will notice that adding elements will add values in 2 tables:

  1. ItemListRelation
  2. ItemType_{System name of ItemCreated in #1}

All very good so far.

The trouble is when you delete an element.

The Delete statement will remove correctly the element from ItemListRelation but it won't remove it from the ItemType table.

Previous versions of DW handled this deletion correctly. How do I know? FOr listing of the elements, we are using a SQL statement directly on the ItemTypeTable. Every time en element was deleted, it was gone from the response. Now, it shows in the response after deletion.

I would assume this behavior is not intended since it can result in a lot of junk data, but I am looking forward to hearing your opinion.

Thank you,
Adrian

 


Replies

 

You must be logged in to post in the forum