stamas
stamas

Reputation: 397

Symfony2 export db to doctrine fixtures

Is there any way to export my existing database rows as doctrine fixtures?

Upvotes: 5

Views: 872

Answers (2)

A.L
A.L

Reputation: 10503

You can use the DoctrineFixturesGeneratorBundle in order to export the data from database as fixtures:

php bin/console doctrine:generate:fixture --entity=Blog:BlogPost \
--ids="12 534 124" --name="bug43" --order="1"

Upvotes: 3

Jon Winstanley
Jon Winstanley

Reputation: 23311

Unfortunately not, there is currently not an export function as there was in symfony 1.x

Upvotes: 2

Related Questions