package Person::Relationship; use base 'MyCDBI'; __PACKAGE__->table('people_tree'); __PACKAGE__->columns(Primary => qw(parent child)); __PACKAGE__->has_a(parent => 'Person'); __PACKAGE__->has_a(child => 'Person'); # CREATE TABLE people_tree ( # parent int NOT NULL REFERENCES people, # child int NOT NULL REFERENCES people, # PRIMARY KEY (parent,child) # );