[eluser]felix_[/eluser]
Hey,
in my database I have stored a lot of objects with a start and end time exact to the second. Now the requirements changed and for calculation purposes I just need the data with seconds set to 0 but I don't want to modify the data the database itself.
So my idea was simply to modify the time string on creation of the object. This works well if I do retrieve the object directly via id.
Code:
$t = new Time(1337);
But when I load a collection the constructor of my model gets executed for every time but always with the value of the same item.
Code:
$t = new Time();
$t->where("user_id", 1337)->get();
So what is the best way to modify the values for ALL loaded items?
Felix