How to get has_many objects in DataExtension object?

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

SS4.4

Question: How to get has_many objects in DataExtension object?

I have two classes Member and Activity. A member has many activities. I have a class MemberExtension which extends Member. Inside MemberExtension, we have a has_many array containing ‘Activities’. How do we get the list of Activities in MemberExtension?

We have tried the following:

$this->Activities()
Error: Uncaught Error: Call to undefined method MemberExtension::Activities()

$this->getOwner()->Activities()
Error: Uncaught BadMethodCallException: Object->__call(): the method 'Activities' does not exist on 'SilverStripe\Security\Member'

// MemberExtension class
class MemberExtension extends DataExtension {
	public static $has_many = [
		'Activities' => Activity::class
	];
}

// Activity class
class Activity extends DataObject {
    private static $has_one = [
        'Member' => Member::class,
    ];
}

// Register MemberExtension in _config.php
Member::add_extension(MemberExtension::class);

In the extension code, you can just use $this->owner->Activities()

Anywhere else, you can just access the relation directly on the member object: $member->Activities()