datajoint-python
datajoint-python copied to clipboard
Add complete support for server side insert with external storage
Currently when you do server side insert (i.e. insert from another relation) and if source and target both have an attribute on the same external storage, it works perfectly fine. However, if the external storage targets differ between the two tables, then it doesn't perform this properly.
noted @fabiansinz something similar also doesn't work from MySQL-native to external e.g:
Target.insert(Source())
if target contains externals, we need to e.g.
Target.insert(Source.fetch())
etc.
Yes, this is a problem since server-side cannot be performed in such cases and a fetch must be performed, possibly implicitly. I propose to simply throw an error at this time suggesting a insert from fetch. I prefer this solution to an implicit fetch because this may be more surprising.