[eluser]titoneo[/eluser]
Hello I'm looking for best practices for DMZ DataMapper. I think it's pretty good.
If I have a model called 'Project' which has many lines of project ('lineproject'), is associated with a 'Client' and a 'Rule'
In other words,
Code:
class Project extends DataMapper
$ has_many = array ('lineproject');
$ has_one = array ('client', 'rule');
...
Ok, now if I want only the 'lines' or only the 'client' or only the 'rule' , where will you include the method to obtain it? Some methods in the Project model, or a method in their respective models?
Another question, if I want to get all lines of a project, I have to instantiate a 'Line' or 'Project' model to call the method, it would be better to make static methods?
Thanks