Realm Object: Override Initializer To Set Non-Persisted Property

Context

I have an Object subclass that has an array of strings, like this:

final class Thing: Object
{
    @Persisted var names: [String]
}

In my UI, an NSTableView has a column for “names”. It takes the values of the array and concatenates them into a single string, using a comma as a delimiter.

We COULD do that with a computed property:

final class Thing: Object
{
    @Persisted var names: [String]

    var combinedName: String {
        return names.joined(separator: ", ")
    }
}

The Problem

The NSTableColumn displaying this combined string cannot be sorted, because to sort the column you must provide an NSSortDescriptor, which does not work with computed properties.

What I Want to Do

I do not want to persist the concatenated string to Realm, because that unncessarily bloats the database with duplicate data. (I will have millions of Thing objects, so it matters.)

Instead, I’d like to use a non-persisted string property that I update at two points in Thing's lifespan:

  1. Immediately when Realm creates the object.
  2. Anytime the names array changes.

#2 is trival. And it’s also trivial to update the non-persisted property when I initially create a Thing. But when the object is created by Realm (such as when the database is loaded or synced from the server) I don’t know what the appropriate override point is.

I just want to set my non-persisted string property as soon as sync is done setting up the object, so that names is correctly populated. Where would I do this?