Copy belongs_to first to handle foreign keys

If you use foreign keys in your database, then you have to copy belongs_to relationships before copying a particular model instance, otherwise the corresponding row may not exist and you'll get a foreign key constraint error.