Skip to content

Commit

Permalink
Merge pull request #2 from martinadamik/master
Browse files Browse the repository at this point in the history
fix duplicate enum type
  • Loading branch information
ivanbarlog authored Nov 30, 2017
2 parents d2712ce + 1eb9f1a commit b6da7ec
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ protected function enumMapping(EnumDBMapInterface $enumDBMap)
$map['enum'] = NullEnum::class;

foreach ($map as $enumName => $enumClass) {
if (Type::hasType($enumName)) {
continue;
}

Type::addType($enumName, EnumDBType::class);
/** @var EnumDBType $type */
$type = Type::getType($enumName);
Expand Down

0 comments on commit b6da7ec

Please sign in to comment.