DataMapper ORM


Definitions of some terms used throughout the docs.

Advanced Relationship

A relationship between two objects that is more complicated than the traditional DataMapper relationship. This includes multiple relationships between the same two objects, and self-relationships.

See: Advanced Relationships

Deep Relationship

A deep relationship is any object that is not related directly to the current object. It is usually specified as a string in the format 'direct/indirect/indirect/...'.

See: Get (Advanced)


Short for DataMapper OverZealous Edition. The version on which Datamapper ORM continues to build.


A class that can be used to add functionality to Datamapper ORM without modifying the source code.

See: Extensions, Included Extensions

Has Many ($has_many)

A relationship where there can be more than one of the related objects.

See: Database Tables, DataMapper Models, Many-to-Many Relationship, One-to-Many Relationship

Has One ($has_one)

A relationship where there can only be one of the related objects.

See: Database Tables, DataMapper Models, One-to-Many Relationship, One-to-One Relationship

In-Table Foreign Keys (ITFK)

A way of joining has one relationships without using a dedicated table.

See: Database Tables

Join Field

Extra columns on a join table that are used to store information about the relationship.

See: Working with Join Fields

Join Table

A dedicated database table used to join two related objects.

See: Database Tables

Many-to-Many Relationship

A relationship where each object can have many of the other object. An example would be User <-> Task. Each user can have many tasks, and each task can have many users.

See: Relationship Types

Many-to-One Relationship - See One-to-Many Relationship
Method Chaining

A feature of PHP5 and DataMapper that allows you to call multiple methods in a chain, instead of having each on their own line.

See: Get

One-to-Many Relationship

A relationship where one object A has can only have one B, but object B can have many A's. This is the most common type of relationship. An example would be User <-> Group. Groups can have many users, but each user belongs to just one group.

See: Relationship Types

One-to-One Relationship

A relationship where each object is related to just one of the other type. This is often used to separate out information that isn't used as often from one of the objects. An example would be User <-> UserPreferences.

See: Relationship Types


Object-Relational Mapping. What DataMapper does.

See: Wikipedia

Query Grouping

Usually, adding parentheses around sections of your query to ensure that the elements are tested in the correct order.

See: Get

Rules - See Validation Rules
Self Relationship

An advanced relationship where an object has a relationship with itself. An example would be a corporate organizational chart.

See: Advanced Relationships

Singular Relationship - See Has One
Validation Rules

A series of commands that DataMapper can use to verify that correct data was input.

See: Validation