Oryx::Association::Hash - Abstract base class for hash associations


Oryx documentation  | view source Contained in the Oryx distribution.

Index


NAME

Top

Oryx::Association::Hash - Abstract base class for hash associations

SYNOPSIS

Top

  package CMS::NamedParagraphs;

  use base qw( Oryx::Class );

  our $schema = {
      associations => [ {
          role  => 'paras',
          type  => 'Hash',
          class => 'CMS::Paragraph',
      } ],
  };

  $x = CMS::Paragraph->create({ para => 'This is a paragraph.' });
  $y = CMS::NamedParagraphs->create({});
  $y->paras->{foo} = $x;
  $y->update;
  $y->commit;

DESCRIPTION

Top

Provides the structure for linking two Oryx classes together using a hash table.

AUTHOR

Top

Richard Hundt <richard NO SPAM AT protea-systems.com>

COPYRIGHT AND LICENSE

Top


Oryx documentation  | view source Contained in the Oryx distribution.