Delete data in metastrings table ?

Hello Elgg members,

When I used  $entity->delete(); to delete entity and its data , I noticed that the data of this entity still in metastrings  table in data base.

How can I resolve this situation ?

Thank you.

  • metastrings  have the ability to refer the same value if you used any where ..

  • And you can enable the 'Garbage collector' plugin to help keep your database 'clean'

  • Thank you so much for the speedy replies.

    Which function can I use to clean the database from action file for example ?

  • there is no need.

    in 6 years of developing for Elgg i never once did database cleanup in my code. I rely on the Elgg API (and garbage collector)

  • Thank you very much Jerome,

    I developed a plugin that import data from excel file to my Elgg web application ,I have the option in this plugin of overwriting these imported data ,in this option I removed the data imported with $entity->delete(); and recreate ,these entities appeared in drop down list in some forms ,before overwriting I don't have a problem of the order of values in drop down list but after overwriting I have a problem in order ,for this reason I think to clean my database to resolve this problem.

    I hope that I explained clearly the situation.

    Thank you very much.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking