开发者

How to Preserve Data in Specific Tables/Entities when using Doctrine2 Fixtures?

I have three tables/entities for which I want to preserve their data when I load Doctrine2 fixtures. Of course, right now, when I run doctrine:fixtures:load, it purges the entire database (except migration_versions) and then loads the fixtures appropriately.

I realize that I can use the --append switch to only add data to the database, but I do want to remove most of the data from the database.

How do I preserve table data from 开发者_JAVA技巧only three tables/entities when using Doctrine2 fixtures?


How about you separate the "append-only" and "delete-only" fixtures classes into separate folders and then run two console commands specifying the fixtures path using --fixtures ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜