appventus / extradoctrine-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
This Bundle include Extra Features for doctrine
Package info
github.com/AppVentus/ExtraDoctrineBundle
Type:symfony-bundle
pkg:composer/appventus/extradoctrine-bundle
dev-master
2014-03-27 10:52 UTC
Requires
- php: >=5.3.0
- symfony/framework-bundle: >=2.3
This package is auto-updated.
Last update: 2021-12-21 22:35:03 UTC
README
This bundle gives extra features to doctrine for symfony2
Configuration
In your doctrine configuration, add the functions:
doctrine:
orm:
dql:
string_functions:
lpad: AppVentus\DoctrineBundle\ORM\Query\AST\Functions\LpadFunction
Usage
Exemple of query builder usage:
//we want to have YYYYMM
//so we need to have 2 digits for month
$zeroFillLiteral = $qb->expr()->literal('2');
$yearMonthConcatExpr = $qb->expr()->concat('bill.year', 'LPAD(bill.month,'.$zeroFillLiteral.',\'0\')');