NAME
EntityModel::Entity - entity definition for EntityModel
VERSION
version 0.102
SYNOPSIS
See EntityModel.
DESCRIPTION
See EntityModel.
METHODS
new
Creates a new entity with the given name.
new
Instantiates a new object.
Takes the following parameters:
name - the name to apply to this entity
field - an arrayref defining the field structure, see "new" in EntityModel::Field for more information on the expected format here.
primary - which field(s) to use as the primary key, as a string or arrayref
auto_primary (optional) - automatically create an appropriate primary key and sequence
type (optional) - type information, currently unused
Returns the new instance
For backwards-compatibility reasons, when called with a single parameter this will have the same effect as the "new_from_name" method. Use of this interface is strongly discouraged in new code, since it is likely to be deprecated in the near future.
new_field
Helper method to create a new field.
dependencies
Report on the dependencies for this entity.
Returns a list of EntityModel::Entity instances required for this entity.
matches
Returns true if this entity has identical content to another EntityModel::Entity.
create_from_definition
Create a new EntityModel::Entity from the given definition (hashref).
add_field
Add a new field to this entity.
field_by_name
Returns the EntityModel::Field matching the given name.
Takes $name as a single parameter.
Returns undef if not found.
INHERITED METHODS
AUTHOR
Tom Molesworth <cpan@entitymodel.com>
LICENSE
Copyright Tom Molesworth 2008-2011. Licensed under the same terms as Perl itself.