> Lets say I change a field called name to first_name. Then I rebuild > the models. fooPeer::NAME will no longer exist. Do I then manually > define that constant in a peer class?
Quite simply .. yes. Thats a lot easier than having to find all the times in your code that you used the old table name explicitly. > > Lets say I sell the site to a corporation who only uses the foo > database, where my application is currently using the bar database. > Is there ever a situation where the field names would change based on > the database engine being used? > Maybe. But the question isn't about post-deployment. Its about DURING development. The abstraction gives you the freedom to, if need be, alter your schema, change table names, column names, entire schema's and have a quick way to make what code you have already written for that app easy to make compliant with any changes (not just column name changes) you have made. > > I can definitely see the benefits, but like I said, I don't see myself > changing field names. > Its the stuff I thought that couldn't happen that did happen that has bit me in the derrier. Be a boy scout .. be prepared :P --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
