I’ve just started working with Doctrine and I don’t quite understand the purpose of table classes and base classes. What is the benefit of generating them explicitly? Is any change necessary in the application logic when these classes are pre-generated and when they are not?
Could you clarify this topic a bit? Thanks.
As far as I know, using doctrine generated classes is no different to using models you’ve written from scratch. I would say the main benefit of generating them automatically is that (apart from involving less work for you!) it cuts down the risk of errors like typos etc.
I tend to think of base classes as the place where basic structure and relationships are contained. I then put any table specific functions in the table class. Don’t forget that all the table classes inherit from their base class and so you only ever need to refer to the table class explicitly.