EntityModel::Entity - entity definition for EntityModel
version 0.102
See EntityModel.
Creates a new entity with the given name.
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.
Helper method to create a new field.
Report on the dependencies for this entity.
Returns a list of EntityModel::Entity instances required for this entity.
Returns true if this entity has identical content to another EntityModel::Entity.
Create a new EntityModel::Entity from the given definition (hashref).
Add a new field to this entity.
Returns the EntityModel::Field matching the given name.
Takes $name as a single parameter.
Returns undef if not found.
clone, sap
Tom Molesworth <cpan@entitymodel.com>
Copyright Tom Molesworth 2008-2011. Licensed under the same terms as Perl itself.
To install EntityModel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm EntityModel
CPAN shell
perl -MCPAN -e shell install EntityModel
For more information on module installation, please visit the detailed CPAN module installation guide.