From 6963bf60286a3b4f3d74f3769a6a2a1f0d001ad0 Mon Sep 17 00:00:00 2001 From: Catalinux Date: Tue, 6 Nov 2012 13:33:21 +0200 Subject: [PATCH] Now MetaDataFilter takess also regexp. For example whern you want to extract metadata if you would filter like this: --filter="Article" would extract also for "ArticleItems" (article_items table). Now you can use --filter="Article$" if you want only that table (articl) --- lib/Doctrine/ORM/Tools/Console/MetadataFilter.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php b/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php index 6d691dc06..3b50da5f0 100644 --- a/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php +++ b/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php @@ -76,9 +76,7 @@ class MetadataFilter extends \FilterIterator implements \Countable $metadata = $it->current(); foreach ($this->filter as $filter) { - if (strpos($metadata->name, $filter) !== false) { - return true; - } + if(preg_match("#$filter#",$metadata->name,$m)) return true; } return false;