Re: Mixing OO and DB
From: Gene Wirchenko <genew_at_ocis.net>
Date: Sun, 02 Mar 2008 22:08:43 -0800
Message-ID: <c95ns39k99v3qqoeuj33li6h5f1biqoean_at_4ax.com>
Date: Sun, 02 Mar 2008 22:08:43 -0800
Message-ID: <c95ns39k99v3qqoeuj33li6h5f1biqoean_at_4ax.com>
Robert Martin <unclebob_at_objectmentor.com> wrote:
[snip]
>Not if they are explanatory. Employee.find("Bob") is a lot easier to
>understand than Select * from Employee_Table where Name = 'Bob'; In
>any case, once you have the method, you can polymorphically replace it
>with test methods etc.
Bah! It is just syntactic sugar and not very sweet at that.
Now try finding Bob who works in Accounting:
select * from employee_table
where name='Bob' and dept='Accounting';
Your go.
[snip]
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences. You have biases. He/She has prejudices.Received on Mon Mar 03 2008 - 07:08:43 CET