[Dbix-class] RecursiveUpdate and many to many

Matt S Trout dbix-class at trout.me.uk
Wed Oct 1 02:26:29 BST 2008


On Tue, Sep 30, 2008 at 02:28:47PM +0100, Pedro Melo wrote:
> >In DBIx::Class terms, that's not how we model it.
> 
> I know and understand that, but from the outside, can you understand  
> that given that many_to_many is discussed in  
> DBIx::Class::Relationships its only natural to people arriving at  
> DBIx::Class to assume that many_to_many is a relation type like any  
> other.

We're seriously considering moving the documentation for it to somewhere
else to clear up that confusion.
 
> I did not start to put many_to_many in relationship_info(), I used a  
> different name for my relationship introspection code.
> relationship_info() is critical for *_related() to work, and I didn't  
> want to mess that up.

Ok, cool. That wasn't clear from what you said, or at least not to me.
 
> But if we have a documented way (cf. ::Relationships) to declare all  
> this types, I think it makes sense to have a method (a different one  
> most likely) to return the information about all the relationships you  
> declared, including many_to_many. This makes it easier to do a lot of  
> things (like the current recursive insert/update stuff, or a  
> documentation generation tool).

As I said, once we have first class *attributes* via DBICMoose this
problem will cease to exist - many-many will be just another attribute
type, so will direct relationships, so will inflated columns, etc.

And it'll all be introspectable through the standard Moose metaprotocol.

I'm going to write up a plan for this as soon as 08100 goes into release
cycle properly, which should be pretty soon now.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the DBIx-Class mailing list