Skip to content

Wrong default value set in PHP model class for Microsoft SQL Server 2014 "BIT" type  #1435

Open
@asgouros

Description

@asgouros

Using Propel 2.0.0-alpha7 (dc55788)

While reverse-engineering existing DB table with column of type "BIT" default value "1",
the generated schema contains (correctly):

<column name="bs_is_placed" phpName="BsIsPlaced" type="BOOLEAN" size="1" required="true" defaultValue="((1))"/>

However after generation of model classes the model class contains for the same column:

 /**
     * Applies default values to this object.
     * This method should be called from the object's constructor (or
     * equivalent initialization method).
     * @see __construct()
     */
    public function applyDefaultValues()
    {
        $this->bs_is_placed = false;
        ...
    }

Using Microsoft SQL Server 2014

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions