[CDBI] Connection with a fixed "where" clause.

Karl.Moens at marsh.com Karl.Moens at marsh.com
Tue Aug 23 08:59:28 BST 2005

Thank you for your answer.

> All you need to do is call $customer->orders instead of calling

I'm afraid it is not as easy as that.  Writing a special "Customer" class
is of course entirely possible, but I wanted to avoid that and use the
tried and trusted CDBI-framework.

Class::DBI::View might be a solution and a step in the good direction as it
can create a particular view on the database (say one for each customer),
so that solves my retrieval problem in a nice way, but ... this module has
no create/update/delete facilities, so I will still have to program all
these methods myself.

Well perhaps there is no easy solution (yet).

> but shouldn't you be changing your view here, not your model?

I my opinion it is indeed the model that changes and the view (and even the
controller) remains the same. The way I had imagined it, he solution would
be to use on big basic storage and each model only allows access to a part
of it. But there is considerable debate on where to draw the borders
between Model, Controller and View.


This message and any attachments are confidential. If you have received
this message in error please delete it from your system. If you require any
assistance please notify the sender. Thank You.

More information about the ClassDBI mailing list