public function getAllColumns($includeParent = true)
    {
        // build a list of columns for this model
        $metaData = $this->getDI()->get('memory');
        $colMap = $metaData->getColumnMap($this);
        if (is_null($colMap)) {
            // but if it isn't present, fall back to attributes
            $colMap = $metaData->getAttributes($this);
        }

        if ($includeParent) {
            $parentModel = $this->getParentModel(true);
            if ($parentModel) {
                /** @var BaseModel $parentModel */
                $parentModel = new $parentModel();
                $parentColumns = $parentModel->getAllColumns(true);

                // the parent model may return null, let's catch and change to an empty array
                // thus indicating that block columns have been "loaded" even if they are blank
                if ($parentColumns == null) {
                    $parentColumns = [];
                }
                $colMap = array_merge($colMap, $parentColumns);
            }
        }
        return $colMap;
    }