Oryx::Association::Reference - Abstract base class for reference associations


Oryx documentation  | view source Contained in the Oryx distribution.

Index


NAME

Top

Oryx::Association::Reference - Abstract base class for reference associations

SYNOPSIS

Top

  package CMS::Document;

  use base qw( Oryx::Class );

  our $schema = {
      associations => [ {
          role  => 'author',
          type  => 'Reference',
          class => 'CMS::Person',
      } ],
  };

  $x = CMS::Person->create({ name => 'Richard Hundt' });
  $y = CMS::Document->create({});
  $y->author($x);
  $y->update;
  $y->commit;

DESCRIPTION

Top

Provides the structure for linking two Oryx classes together using a simple references.

AUTHOR

Top

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

Copyright (c) 2005 Richard Hundt.

This library is free software and may be used under the same terms as Perl itself.


Oryx documentation  | view source Contained in the Oryx distribution.