AddFieldToTab not working

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

Silverstripe Version:

I’m new to silverstripe. I tried to make a property holder that can create Categories. so I added $has_many in PropertyHolder.php, then $has_one, in the CategoryData.php.
then I use AddFieldToTab ot have a new tab to insert the Categories, but when I add new Property holder in the CMS, there’s no Tab for Categories. please help me figure out what I did wrong.

class PropertyHolder extends Page
	private static $allowed_children = [

	private static $has_many = [

	public function getCMSField()
		$fields = parent::getCMSField();

		$fields->addFieldToTab('Root.Categories', Gridfield::create(
			'Property Categories',

		return $fields;


class CategoryData extends DataObject
private static $db = [
‘Title’ =>‘Varchar’

private static $has_one = [

public function getCMSField()
	return FieldList::create(


The function name should be getCMSFields() (plural) - and so should the call to parent::getCMSFields()

Hopefully that’s all it is.