08-04-2009, 07:28 AM
[eluser]Treeda[/eluser]
[quote author="jedd" date="1249410227"][quote author="Treeda" date="1249407944"]
(please ignore that i could use the same table).
[/quote]
Actually .. I don't think I will.
At the moment you're asking for help to resolve a problem of your own creation, and you made the mistake of revealing that you not only know you're making a mistake, but you know how to fix it.
So .. go and fix your schema.
Having two mostly-the-same models, and two mostly-the-same tables containing book/magazine information, and two mostly-the-same tables containing book-comments/magazine-comments - is just plain silly.
And if you reckon the problems will be all over once you work out how to re-use a model .. well, allow me to disabuse you of this notion. A bad design sticks around like forever.[/quote]
Unfortunatly you didn't got the problem. the question is plain simple and clear. How to reuse a model.
i don't want to have all the stuff in ONE table due to performance and size issues, it is absolut intended to have 2 tables to store that stuff. So don't take it rude but your answer sounds a bit arrogant and shows me you don't even see the neccessarity to keep models flexible to maybe share them between projects?
[quote author="jedd" date="1249410227"][quote author="Treeda" date="1249407944"]
(please ignore that i could use the same table).
[/quote]
Actually .. I don't think I will.

At the moment you're asking for help to resolve a problem of your own creation, and you made the mistake of revealing that you not only know you're making a mistake, but you know how to fix it.
So .. go and fix your schema.
Having two mostly-the-same models, and two mostly-the-same tables containing book/magazine information, and two mostly-the-same tables containing book-comments/magazine-comments - is just plain silly.
And if you reckon the problems will be all over once you work out how to re-use a model .. well, allow me to disabuse you of this notion. A bad design sticks around like forever.[/quote]
Unfortunatly you didn't got the problem. the question is plain simple and clear. How to reuse a model.
i don't want to have all the stuff in ONE table due to performance and size issues, it is absolut intended to have 2 tables to store that stuff. So don't take it rude but your answer sounds a bit arrogant and shows me you don't even see the neccessarity to keep models flexible to maybe share them between projects?