[eluser]juddmuir[/eluser]
Thinking about it from a re-usable point of view, is there a clever bit of code to loop through the object's datamodel variables and look for matches in the current object?
That way you could declare an array when first instantiating the object, and when you do save(), or update() etc etc, you first call the function to populate the array, pulling out the object's data and stuffing it into the datamodel array. Obviously, you'd have to ensure that the datamodel array variables are the same name as the object's variables!
Hmm, I'll see if I can crack that one, not something I've tried before.