register(...models) {
        models.forEach((model) => {
            if (model.modelName === undefined) {
                throw new Error(
                    "A model was passed that doesn't have a modelName set"
                );
            }

            model.invalidateClassCache();

            this.registerManyToManyModelsFor(model);
            this.registry.push(model);

            Object.defineProperty(this, model.modelName, {
                get: () => {
                    // make sure virtualFields are set up
                    this._setupModelPrototypes(this.registry);

                    return createModelSelectorSpec({
                        model,
                        orm: this,
                    });
                },
            });
        });
    }
Registers a {@link Model} class to the ORM.

If the model has declared any ManyToMany fields, their
through models will be generated and registered with
this call, unless a custom through model has been specified.

@param  {...Model} models - a {@link Model} class to register
@return {undefined}