Skip to content

Commit

Permalink
Hardcode file column names
Browse files Browse the repository at this point in the history
Co-authored-by: Fran Moreno <franmomu@gmail.com>
  • Loading branch information
IonBazan and franmomu authored Aug 5, 2021
1 parent 5f5f5b3 commit d2f182e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#[Attribute(Attribute::TARGET_PROPERTY)]
final class Filename extends AbstractField
{
public function __construct(?string $name = 'filename')
public function __construct()
{
parent::__construct($name, 'string', false, [], null, true);
parent::__construct('filename', 'string', false, [], null, true);
}
}
4 changes: 2 additions & 2 deletions lib/Doctrine/ODM/MongoDB/Mapping/Annotations/File/Length.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#[Attribute(Attribute::TARGET_PROPERTY)]
final class Length extends AbstractField
{
public function __construct(?string $name = 'length')
public function __construct()
{
parent::__construct($name, 'int', false, [], null, true);
parent::__construct('length', 'int', false, [], null, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ final class Metadata extends AbstractField
public $defaultDiscriminatorValue;

public function __construct(
?string $name = 'metadata',
bool $nullable = false,
array $options = [],
?string $strategy = null,
Expand All @@ -42,7 +41,7 @@ public function __construct(
?array $discriminatorMap = null,
?string $defaultDiscriminatorValue = null
) {
parent::__construct($name, ClassMetadata::ONE, $nullable, $options, $strategy, $notSaved);
parent::__construct('metadata', ClassMetadata::ONE, $nullable, $options, $strategy, $notSaved);

$this->targetDocument = $targetDocument;
$this->discriminatorField = $discriminatorField;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#[Attribute(Attribute::TARGET_PROPERTY)]
final class UploadDate extends AbstractField
{
public function __construct(?string $name = 'uploadDate', string $type = 'date')
public function __construct()
{
parent::__construct($name, $type, false, [], null, true);
parent::__construct('uploadDate', 'date', false, [], null, true);
}
}

0 comments on commit d2f182e

Please sign in to comment.