On Wednesday 06 February 2002 07:44 am, Perrin Harkins wrote:
> I thought people typically modelled single records with their O/R classes.
> That's what I do.  I don't create objects for data I don't need.

I agree. I too thought this was a standard practice. In the few cases where I 
need a set of rows, I do one of two things depending on what's the most 
intuitive in the problem-domain. For simple sets, I just implement a class 
method that returns an array of objects instead of just one. For more complex 
collections (e.g. where I need to perform operations on the set as a whole) I 
create a database-aware container class.

-- 
Milo Hyson
CyberLife Labs, LLC


Reply via email to