[CDBI] What is the best way to search for record of table based on criteria of a field of its child table?

[prev] [thread] [next] [Date index for 2006/01/06]

From: Sai Tong
Subject: [CDBI] What is the best way to search for record of table based on criteria of a field of its child table?
Date: 18:11 on 06 Jan 2006
Given two tables:

table A --  Music::Artist
 tha  has a one-to-many relationship with
table B --   Music::CD  with the following setup:

Music::Artist->has_many(cds => 'Music::CD');
Music::CD->columns(All => qw/cdid artist title year reldate/);
Music::CD->has_a(artist => 'Music::Artist');

Is it possible to do the following with Class:DBI  

Music::Artist -> search( Music::Artist->cds->year => 1990 )

?

What is the best way to search for records of table A based on criteria 
of a field of its child table like table B?




_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] What is the best way to search for record of table based on criteria of a field of its child table?
Sai Tong 18:11 on 06 Jan 2006

Generated at 01:21 on 10 Jan 2006 by mariachi v0.52