My situation was as follows: Because I needed to use the LimitWordCount method on the title of the page, I had to cast it to a text (default it is a varchar and LimitWordCount is not available on that).

So I added:

static $casting = array(
"Title" => "Text",
);

When I subsequently implemented a search (search tutorial) and added this: