public function getTableName($type = 'plural')
    {
        if ($type == 'plural') {
            if (isset($this->pluralTableName)) {
                return $this->pluralTableName;
            } else {
                $this->pluralTableName = $this->getSource();
                return $this->pluralTableName;
            }
        }

        if ($type == 'singular') {
            if (isset($this->singularTableName)) {
                return $this->singularTableName;
            } else {
                $tableName = $this->getTableName('plural');
                // not the smartest way to make a value singular
                $this->singularTableName = substr($tableName, 0, strlen($tableName) - 1);
                return $this->singularTableName;
            }
        }
    }