archi-contribs / database-plugin

Database export/import plugin that store models in a central database repository
Other
81 stars 23 forks source link

Nested folders not recognised when importing certain components from db #153

Closed Re4son closed 2 years ago

Re4son commented 2 years ago

Some components are not imported into the correct folder when the following conditions exist:

These object are imported under the folder "top level folder + 1" and not deeper

Steps to reproduce:

  1. Create new model and export to database
  2. Export attached example model containing nested folder structure into database
  3. Close all models in archi
  4. Import new model from step 1
  5. Import components from db into model and choose the model from step 2

Result: Various object have been moved up from Folder11 to Folder1

Tested with various versions of Archi, various databases, & latest version of db plugin,

herve91 commented 2 years ago

Hi,

Unfortunately, the begaviour you describe is not a bug but the way I developped the plugin.

Basically, components can be linked to several models, each of them having their own folders structure. The case you describe with two models only is quite a simple case, but when the database contains dozens or hundreds of models having linked components in different folders, if becomes impossible to know in witch folder to import it.

That's the reason why I import components in their default folder.

Re4son commented 2 years ago

I appreciate that behavior when importing selected components but this is not what happens when you import entire models. The entire folder structure is created and:

herve91 commented 2 years ago

Yes, you're right. It needs improvement.

I'll work on it and let you know as soon it's done.

Re4son commented 2 years ago

You're an absolute legend! Thanks heaps.

herve91 commented 2 years ago

My apologies, I do not have a lot of time at the moment. Just to keep you informed, I fixed it when importing elements and still need to fix it when importing relationships.

Ellers01 commented 2 years ago

Would like to add I'm also having this issue atm. Keen for any updates 👍

herve91 commented 2 years ago

Hi, I just posted new version 4.9.6 which fixes your issue.