I’m trying to build an application that goes beyond having relationships that are easily mapped 1:1 between Model and Database. I’ve had a look around the forums and the internet in general and there seems to be a big debate about “The Vietname of Computing Science” and Mappers etc. but I haven’t found the golden bullet, that I’ve admittedly been looking for.
Is there a best practice in Yii for how you organise your database interaction when “standard” AR fails you? I’ve read about behaviours, single table inheritance and overriding the instantiate method. I’ve not had that “aha” moment where I was looking at an obviously good solution to this issue. One option I have considered is using RedbeanPHP but that would be a pretty big step away from Yii.
Do I introduce a data mapper class to convert my PHP classes into entities I can store? What do I do?
If you could point me one direction or another I’ll do my best to go there.
Thanks for your help.