Closed dhaarbrink closed 8 years ago
@dhaarbrink Well the issue here is that apparently the readonly entities were not implemented to represent views. Don't know how the view should be represented nor how they should be treated by the data-fixture.
The easiest is probably to put those readonly entities (views) on a different connection/entity manager. So that they are not touched by purge at all.
I use the filter schema expression from the DBAL connection. See Add ability to exclude tables from purge in ORM
# Doctrine Configuration
doctrine:
dbal:
schema_filter: ~^(?!view)~
@YaoOcelotl thanks for the tip. Sadly it isn't released yet, but I did that myself now. This was indeed what I needed, I will close this PR.
In my case this entity is implemented as a view, DELETE or TRUNCATE won't work. Whatever the case, readOnly implies no changing the data.