Spine-Toolbox icon indicating copy to clipboard operation
Spine-Toolbox copied to clipboard

Importer: import objects should be a class level decision

Open spine-o-bot opened this issue 4 years ago • 2 comments

In GitLab by @jkiviluo on Nov 6, 2020, 08:57

Currently one can check 'import objects' in the importer. This will import objects from all classes (aka dimensions). However, it can be the case that the user wants to import only certain classes (e.g. don't import definition classes that contain stuff like up/down).

Not a top priority, since one can always import objects from all classes.

spine-o-bot avatar Feb 04 '21 09:02 spine-o-bot

In GitLab by @manuelma on Nov 6, 2020, 09:26

I think it needs to import objects for all the classes otherwise it wouldn't work. There can't be a relationship class without the involved object classes. The import objects is a convenience feature so the user doesn't have to create separate mappings for every object class -they just define their mapping for the relationship class, and the necessary object classes are created automatically.

Maybe I'm missing something?

spine-o-bot avatar Feb 04 '21 09:02 spine-o-bot

In GitLab by @jkiviluo on Nov 6, 2020, 09:58

That object class can already be in the DB (since it was imported as a separate object class or as a member of another relationship class or through separate route). If you don't import the objects from the class in the relationship, then you can catch errors in data (wrong spelling etc.). If you import, you can end up with plantA and plant_A and never notice.

spine-o-bot avatar Feb 04 '21 09:02 spine-o-bot