Merge pull request #276 from chrisyue/master

table name auto add underscore if entity name consists of more than two ...
This commit is contained in:
Steven Oliver 2013-09-11 05:47:35 -07:00
commit 8f11592866

View File

@ -169,7 +169,11 @@ use Doctrine\ORM\Mapping as ORM;
* ${3:@author `whoami`} * ${3:@author `whoami`}
* *
* @ORM\Entity() * @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 class `!p
snip.rv = re.match(r'.*(?=\.)', fn).group() snip.rv = re.match(r'.*(?=\.)', fn).group()