Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add isInteger to help symfony form choicelist index #520

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions generator/lib/builder/om/PHP5ObjectBuilder.php
Expand Up @@ -3805,7 +3805,6 @@ protected function addRefFKSet(&$script, $refFK)
$inputCollectionEntry[0] = strtolower($inputCollectionEntry[0]);

$collName = $this->getRefFKCollVarName($refFK);
$relCol = $this->getFKPhpNameAffix($refFK, $plural = false);

$script .= "
/**
Expand All @@ -3822,10 +3821,6 @@ public function set{$relatedName}(PropelCollection \${$inputCollection}, PropelP
{
\$this->{$inputCollection}ScheduledForDeletion = \$this->get{$relatedName}(new Criteria(), \$con)->diff(\${$inputCollection});

foreach (\$this->{$inputCollection}ScheduledForDeletion as \${$inputCollectionEntry}Removed) {
\${$inputCollectionEntry}Removed->set{$relCol}(null);
}

\$this->{$collName} = null;
foreach (\${$inputCollection} as \${$inputCollectionEntry}) {
\$this->add{$relatedObjectClassName}(\${$inputCollectionEntry});
Expand Down Expand Up @@ -3885,7 +3880,6 @@ protected function addRefFKRemove(&$script, $refFK)
$lowerRelatedObjectClassName[0] = strtolower($lowerRelatedObjectClassName[0]);

$collName = $this->getRefFKCollVarName($refFK);
$relCol = $this->getFKPhpNameAffix($refFK, $plural = false);

$script .= "
/**
Expand All @@ -3901,7 +3895,6 @@ public function remove{$relatedObjectClassName}(\${$lowerRelatedObjectClassName}
\$this->{$inputCollection}->clear();
}
\$this->{$inputCollection}[]= \${$lowerRelatedObjectClassName};
\${$lowerRelatedObjectClassName}->set{$relCol}(null);
}

return \$this;
Expand Down
10 changes: 10 additions & 0 deletions runtime/lib/map/ColumnMap.php
Expand Up @@ -211,6 +211,16 @@ public function isNumeric()
return ($this->type == PropelColumnTypes::NUMERIC || $this->type == PropelColumnTypes::DECIMAL || $this->type == PropelColumnTypes::TINYINT || $this->type == PropelColumnTypes::SMALLINT || $this->type == PropelColumnTypes::INTEGER || $this->type == PropelColumnTypes::BIGINT || $this->type == PropelColumnTypes::REAL || $this->type == PropelColumnTypes::FLOAT || $this->type == PropelColumnTypes::DOUBLE);
}

/**
* Whether this column is an integer
*
* @return boolean
*/
public function isInteger()
{
return $this->type === PDO::PARAM_INT;
}

/**
* Whether this column is a text column (varchar, char, longvarchar).
* @return boolean
Expand Down