Re: many-to-many relationship and sorting

[prev] [thread] [next] [Date index for 2005/03/08]

From: Matt S Trout
Subject: Re: many-to-many relationship and sorting
Date: 20:25 on 08 Mar 2005
On Tue, Mar 08, 2005 at 12:52:28PM -0500, Perrin Harkins wrote:
> On Tue, 2005-03-08 at 17:14 +0100, Hartmaier Alexander wrote:
> > Would it be difficult to implement this?
> 
> If you don't care about efficiency, you can just sort the returned
> objects in perl.  If you do care, you can use a custom set_sql for it.
> You could also look at the HasManyToMany plugin that Matt Trout posted
> earlier.

http://trout.me.uk/perl/Class-DBI-Relationship-HasManyToMany-0.02.tar.gz

You can set an order_by parameter when you create the relationship; if
this isn't what you want have a look at the _method_retrieve method in
the module.

It's not a full-featured relationship yet, but as a result the code is
relatively simple so you shouldn't find it too hard to modify. Requests
and/or patches welcome.

        -- 
            Matt S Trout            Brag sheet:    http://trout.me.uk/services.html
LAMP, Infrastructure        Contact:       services@xxxxx.xx.xx
   and Automation
     specialist                                       Do it once. Do it right.

(message missing)

many-to-many relationship and sorting
Hartmaier Alexander 15:48 on 08 Mar 2005

Re: many-to-many relationship and sorting
Perrin Harkins 16:08 on 08 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 16:14 on 08 Mar 2005

Re: many-to-many relationship and sorting
Perrin Harkins 17:52 on 08 Mar 2005

Re: many-to-many relationship and sorting
Matt S Trout 20:25 on 08 Mar 2005

Re: many-to-many relationship and sorting
Jay Strauss 18:37 on 08 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 09:31 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 09:53 on 09 Mar 2005

Re: many-to-many relationship and sorting
Matt S Trout 15:29 on 12 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 10:29 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 10:55 on 09 Mar 2005

Re: many-to-many relationship and sorting
William Ross 11:14 on 09 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 11:26 on 09 Mar 2005

Re: many-to-many relationship and sorting
William Ross 11:36 on 09 Mar 2005

many-to-many relationship and sorting
Hartmaier Alexander 12:24 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 12:57 on 09 Mar 2005

Re: many-to-many relationship and sorting
Jay Strauss 14:15 on 09 Mar 2005

Re: many-to-many relationship and sorting
Tony Bowden 15:14 on 09 Mar 2005

Re: many-to-many relationship and sorting
Perrin Harkins 17:31 on 09 Mar 2005

Problem 'setting' data.
John Day 23:00 on 09 Mar 2005

Re: Problem 'setting' data.
Michael Peters 23:12 on 09 Mar 2005

Re: Problem 'setting' data.
Jason Galea 23:30 on 09 Mar 2005

Re: many-to-many relationship and sorting
Matt S Trout 15:31 on 12 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52