protected function addConstantsAndAttributes(&$script)
    {
        $dbName = $this->getDatabase()->getName();
        $tableName = $this->getTable()->getName();
        $tablePhpName = $this->getTable()->isAbstract() ? '' : addslashes($this->getStubObjectBuilder()->getFullyQualifiedClassname());
        $script .= "
    /** the default database name for this class */
    const DATABASE_NAME = '$dbName';

    /** the table name for this class */
    const TABLE_NAME = '$tableName';

    /** the related Propel class for this table */
    const OM_CLASS = '$tablePhpName';

    /** the related TableMap class for this table */
    const TM_CLASS = '" . addslashes($this->getTableMapClass()) . "';

    /** The total number of columns. */
    const NUM_COLUMNS = " . $this->getTable()->getNumColumns() . ";

    /** The number of lazy-loaded columns. */
    const NUM_LAZY_LOAD_COLUMNS = " . $this->getTable()->getNumLazyLoadColumns() . ";

    /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
    const NUM_HYDRATE_COLUMNS = " . ($this->getTable()->getNumColumns() - $this->getTable()->getNumLazyLoadColumns()) . ";
";
        $this->addColumnNameConstants($script);
        $this->addInheritanceColumnConstants($script);
        if ($this->getTable()->hasEnumColumns()) {
            $this->addEnumColumnConstants($script);
        }

        $script .= "
    /** The default string format for model objects of the related table **/
    const DEFAULT_STRING_FORMAT = '" . $this->getTable()->getDefaultStringFormat() . "';

    /**
     * An identity map to hold any loaded instances of " . $this->getObjectClassname() . " objects.
     * This must be public so that other peer classes can access this when hydrating from JOIN
     * queries.
     * @var        array " . $this->getObjectClassname() . "[]
     */
    public static \$instances = array();

";

        // apply behaviors
        $this->applyBehaviorModifier('staticConstants', $script, "	");
        $this->applyBehaviorModifier('staticAttributes', $script, "	");

        $this->addFieldNamesAttribute($script);
        $this->addFieldKeysAttribute($script);

        if ($this->getTable()->hasEnumColumns()) {
            $this->addEnumColumnAttributes($script);
        }
    }