In my use case, I have several file bundles (types) with different fields on them. In order to migrate them, I have separate classes for each bundle, with the bundle name being passed in as an argument. This works great for getting the fields to appear as mappable, however when I run drush ms each separate file migration lists *all* files in the file_managed table as its total, not just limited to the specific bundle the class is designed to import.

I have worked around this by overriding the query() method in my classes to add a condition with the bundle name in it, but it seems odd to me that the original method doesn't take this into account when the bundle can be passed in and is used to pick up field information.

Is this a bug I should be filing (and writing a patch for, which doesn't look like that much work), or am I misunderstanding the behavior and/or making an architectural error with my class structure?

Thanks for any advice.

Comments

acy76 created an issue.