[Catalyst] ActiveRecord for Perl
Eden Cardim
edencardim at gmail.com
Tue May 22 15:02:20 GMT 2007
On 5/22/07, mreece at vinq.com <mreece at vinq.com> wrote:
> one thing i really like about AR is the association proxies, where
> relationships themselves are objects you can call methods (ie, find) on
>
> class User < ActiveRecord::Base
> has_many :items
> end
> class Item < ActiveRecord::Base
> belongs_to :user
> end
>
> items = user.items
> item = user.items.find(params[:id])
> new_item = user.items.create!(params[:item])
>
> you can get close to that with RDBO's $user->find_items() (and maybe DBIC
> has something similarish) but the ruby way here feels so much better!
"ruby way"? That's exactly how DBIC works.
--
Eden Cardim
Instituto Baiano de Biotecnologia
Núcleo de Biologia Computacional e Gestão de Informações Biotecnológicas
Laboratório de Bioinformática
More information about the Catalyst
mailing list