Rose::DB::Object::Metadata::Relationship::OneToOne - One to one table relationship metadata object.
use Rose::DB::Object::Metadata::Relationship::OneToOne; $rel = Rose::DB::Object::Metadata::Relationship::OneToOne->new(...); $rel->make_methods(...); ...
Objects of this class store and manipulate metadata for relationships in which a single row from one table refers to a single row in another table.
This class inherits from Rose::DB::Object::Metadata::Relationship. Inherited methods that are not overridden will not be documented a second time here. See the Rose::DB::Object::Metadata::Relationship documentation for more information.
get_set
Rose::DB::Object::MakeMethods::Generic, object_by_key, ...
get_set_now
Rose::DB::Object::MakeMethods::Generic, object_by_key, interface => 'get_set_now'
interface => 'get_set_now'
get_set_on_save
Rose::DB::Object::MakeMethods::Generic, object_by_key, interface => 'get_set_on_save'
interface => 'get_set_on_save'
delete_now
Rose::DB::Object::MakeMethods::Generic, object_by_key, interface => 'delete_now'
interface => 'delete_now'
delete_on_save
Rose::DB::Object::MakeMethods::Generic, object_by_key, interface => 'delete_on_save'
interface => 'delete_on_save'
See the Rose::DB::Object::Metadata::Relationship documentation for an explanation of this method map.
Get or set the default list of auto_method_types. TYPES should be a list of relationship method types. Returns the list of default relationship method types (in list context) or a reference to an array of the default relationship method types (in scalar context). The default list contains "get_set_on_save" and "delete_on_save".
Return a method name for the relationship method type TYPE.
For the method types "get_set", "get_set_now", and "get_set_on_save", the relationship's name is returned.
For the method types "delete_now" and "delete_on_save", the relationship's name prefixed with "delete_" is returned.
Otherwise, undef is returned.
Get or set the Rose::DB::Object::Metadata::ForeignKey object to which this object delegates all responsibility.
One to one relationships encapsulate essentially the same information as foreign keys. If a foreign key object is stored in this relationship object, then all compatible operations are passed through to the foreign key object. This includes making object method(s) and adding or modifying the local-to-foreign column map. In other words, if a foreign_key is set, the relationship object simply acts as a proxy for the foreign key object.
If passed a local column name LOCAL, return the corresponding column name in the foreign table. If passed both a local column name LOCAL and a foreign column name FOREIGN, set the local/foreign mapping and return the foreign column name.
Get or set a reference to a hash that maps local column names to foreign column names.
Get or set the boolean value that determines what happens when the columns in the column_map have defined values, but the object they point to is not found. If true, a fatal error will occur. If false, then the methods that service this relationship will simply return undef. The default is true.
This method is the mirror image of the referential_integrity method. Passing a true is the same thing as setting referential_integrity to false, and vice versa. Similarly, the return value is the logical negation of referential_integrity.
Returns "one to one".
John C. Siracusa (siracusa@mindspring.com)
Copyright (c) 2006 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Rose::DB::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rose::DB::Object
CPAN shell
perl -MCPAN -e shell install Rose::DB::Object
For more information on module installation, please visit the detailed CPAN module installation guide.