On Fri, 4 Apr 2008, Peter Rabbitson wrote:
There seems to be an additional problem, which lies in the MySQL producer itself (maybe others too). Keeping it in the thread as it is from the same department. Example (a crude linked list):__PACKAGE__->add_columns ( id => { data_type => 'BIGINT', is_auto_increment => 1, }, prev_id => { data_type => 'BIGINT', is_foreign_key => 1, }, name => { data_type => 'VARCHAR', size => 255, }, ); __PACKAGE__->set_primary_key ('id');__PACKAGE__->add_unique_constraint (prev => [qw/prev_id/]); # enforces 1:1__PACKAGE__->might_have ('next_option', __PACKAGE__, 'prev_id' );__PACKAGE__->belongs_to ('prev_option', __PACKAGE__, 'prev_id', {join_type => 'left' });
Assuming your next_option works the same way as your prev_option, but just might be empty, they should both be a "belongs_to", not "might_have".
Jess _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
