[Dbix-class] RFC: DBIx-Class-Tree

Matt S Trout dbix-class at trout.me.uk
Mon Apr 3 20:18:54 CEST 2006


Alan Humphrey wrote:
> Thanks Aran.  After looking at the code here are my questions/comments:
> 
> - The module requires a "position" column in the underlying table to
> maintain some notion of order.  How common is this practice?  I've never
> done it, but that doesn't mean anything.

document has_many pages: pages need to be ordered

menu has_many links: links need to be ordered

host has_many MXes: MXes need to be ordered

ACL has_many rules: rules need to be ordered

> - How well will the module play with auto-increment columns?  I see the
> insert and delete methods expect to be able to update the position column at
> will, so you probably wouldn't want to use an auto-increment column for your
> position.  Maybe a note in the doc?

If "Don't use auto-increment for a column containing actual application data" 
isn't obvious to somebody, the odds of them being able to design a database at 
all seem pretty minimal to me.

> I'm not convinced it belongs in the main distribution.

I think given it's lightweight, self-contained and represents a fairly common 
case any time you're modeling semantic data it might as well be.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list