Skip to content

Commit

Permalink
Merge pull request SirVer#276 from chrisyue/master
Browse files Browse the repository at this point in the history
table name auto add underscore if entity name consists of more than two ...
  • Loading branch information
Steven Oliver committed Sep 11, 2013
2 parents 23fc4c5 + 3218737 commit 8f11592
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UltiSnips/php/symfony2.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ use Doctrine\ORM\Mapping as ORM;
* ${3:@author `whoami`}
*
* @ORM\Entity()
* @ORM\Table(name="`!p snip.rv = re.match(r'.*(?=\.)', fn).group().lower()`")
* @ORM\Table(name="`!p
tmp = re.match(r'.*(?=\.)', fn).group()
tmp = re.sub(r'\B([A-Z])', r'_\1', tmp)
snip.rv = tmp.lower()
`")
*/
class `!p
snip.rv = re.match(r'.*(?=\.)', fn).group()
Expand Down

0 comments on commit 8f11592

Please sign in to comment.