Duplicate Page with all relations

Silverstripe Version: 4

When users duplicate a page has_one relations are duplicated but seems any others like $many_many aren’t.

Is this expected?

I’m not having any luck finding any documentation or examples on this that are recent. There’s some resources like this from 2012.

Following Page > SiteTree > DataObject - DataObject has a duplicate function in it.

Am I meant to over write this function in my Pages class? Or is it a config setting:

        if ($relations === null) {
            $relations = $this->config()->get('cascade_duplicates');
            // Remove any duplicate entries before duplicating them
            if (is_array($relations)) {
                $relations = array_unique($relations);