[mysql]: recursively constructing inner objects