How to reset the engine BDM in the BonitaSoft Portal?

I know that in studio when we want to zero out BDM it is possible to do this by going to the BDM manager and it can be reset when leaving the manager, but how can I clear the BDM that I imported for the portal? I tried importing the BDM again but it always displaying content that I have already deleted from the database, if you have a ideia

If you’re using “mysql”

shell> mysql business_data
mysql> show tables;
– then for each table shown…
mysql> delete from table_name_here;
mysql> delete from other_table_name_here;
^D

You may not be able to delete from the tables in any old order you choose due to constraints - but one or two passes round the loop will usually work.

You can also do it using mysqldump with options to avoid inclusion of data, and them re-import the dump output.

disclaimer: DO THIS AT YOUR OWN RISK!!!

Just to make sure that I’m correctly understand your use case, do you want to:

  • delete the data in your BDM database (i.e. the row of the tables)
    or
  • delete the whole BDM data and business objects definition (i.e. drop the tables and associate Java object definition)
    ?

I’m not sure I’ll explain, but my need is that I can do exactly the same thing I do when I reset BDM in the BonitaSoft studio

Actually when you reset the BDM in the Studio it will not only delete existing but also drop existing tables and create tables as defined in the latest definition of the BDM.

When you deploy a BDM definition on your server it will not drop table nor delete existing data but only create new tables and add columns to existing tables.

So if you want to have the same behavior as the reset in Bonita Studio you need not only to delete the content of the table but also drop them and then deploy your latest BDM definition.

Thanks for the comment antoine.mottier, I did what you suggested to import the BDM again and it worked :slight_smile: