Reputation: 2617
I'm looking into Doctrine 2 for a project I'll be working on and have some questions. The database I'll be working on is not normalized and I can't change that. This database doesn't even enforce referential integrity. Is Doctrine 2 a viable solution in this case? In addition I'm concerned if a change is made to the database, will the app break if I do not generate the doctrine database schema.
Upvotes: 0
Views: 130
Reputation: 2698
On the project I worked on there was a need to have couple of denormalised tables in order to improve performance. I used doctrine for it and it worked ok. So answering your questions:
Product
. By doing it it is required to make a change of the price in StoreProduct
table. So you create trackProductChangeSubscriber
that detects changes in Product
and do changes required in StoreProduct
. Other option is if you need to change data in related table, you can easily use PersistentCollection
in the entity to change related tables.I hope I've answered your question.
Upvotes: 1