Active record pattern
From CSSEMediaWiki
(Difference between revisions)
m (New page: ''An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.'' = How it works = An object is directly related to the row...) |
m |
||
Line 2: | Line 2: | ||
= How it works = | = How it works = | ||
− | An object is directly related to the row in a table or view. It is very similar to the [Row data gateway pattern] except that it contains the behavior of the object (as well as the data). | + | An object is directly related to the row in a table or view. It is very similar to the [[Row data gateway pattern]] except that it contains the behavior of the object (as well as the data). |
= When to use it = | = When to use it = |
Revision as of 08:58, 17 October 2010
An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.
How it works
An object is directly related to the row in a table or view. It is very similar to the Row data gateway pattern except that it contains the behavior of the object (as well as the data).
When to use it
Simple objects with simple business rules.
Example
TBC