I am still trying to wrap my head around DBIx::Class, and I am trying
to create a little app with it. Currently I have four tables, "feed",
"item", "user" and "subscription". The "subscription" table contains
a primary key consisting of user_id and feed_id.
From that I woule like to retrieve the items in pubdate order, like
this in SQL:
select
i.item_id,i.enclosure
from
item i
inner join
subscription s on i.feed_id=s.feed_id
where
s.user_id = 1
order by i.pubdate
desc limit 30;
I really can't figure out how to do it from the artist/cd examples in
cookbok. Subscription has not a direct relation with item. The
subscription class is properly setup as a has_many with belongs_to.
--
patrik_wallstrom->foodfight->[EMAIL PROTECTED]>+46-733173956
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/