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

use parent:: instead of ModelCritera:: #2016

Closed
wants to merge 6 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Propel/Generator/Builder/Om/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ public function delete(?ConnectionInterface \$con = null): int
";

$script .= "
\$affectedRows += ModelCriteria::delete(\$con);
\$affectedRows += parent::delete(\$con);
{$this->getTableMapClassName()}::clearRelatedInstancePool();

return \$affectedRows;
Expand Down
4 changes: 2 additions & 2 deletions src/Propel/Generator/Reverse/MysqlSchemaParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function getColumnFromRow(array $row, Table $table): Column
$/x';
if (preg_match($regexp, $row['Type'], $matches)) {
$nativeType = $matches[1];
if ($matches[2]) {
if (strlen(trim($matches[2])) > 0) {
$cpos = strpos($matches[2], ',');
if ($cpos !== false) {
$size = (int)substr($matches[2], 0, $cpos);
Expand All @@ -246,7 +246,7 @@ public function getColumnFromRow(array $row, Table $table): Column
$size = (int)$matches[2];
}
}
if ($matches[3]) {
if (strlen($matches[3]) > 0) {
$sqlType = $row['Type'];
}
if (isset(static::$defaultTypeSizes[$nativeType]) && $scale == null && $size === static::$defaultTypeSizes[$nativeType]) {
Expand Down
1 change: 0 additions & 1 deletion tests/Fixtures/schemas/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
<reference local="customer_id" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="bookstore_contest" onDelete="cascade">
<reference local="bookstore_id" foreign="bookstore_id"/>
rizwanjiwan marked this conversation as resolved.
Show resolved Hide resolved
<reference local="contest_id" foreign="id"/>
</foreign-key>
</table>
Expand Down
Loading