andrew-kandels/contain — pull request #31 by mwillbanks (2014-07-21 17:08:08+00:00)
Title: Made extended properties work as first class citizens

## Overview

Allow for extended properties to become first class citizens. This ultimately means that if I call get, set, toArray, export and properties that I can get back or retrieve extended properties. This would be an option called auto_extended which ultimately means that if a property does not exist, automatically add it and extend the entity.

## Why

This becomes extremely helpful when dealing with the contain mapper. There are numerous times when you might want to select manually from a service and add in meta data records that can assist you with labeling items and also allowing the entity to support looking at those items.

We do not necessarily want them to be properties of the entity itself as they will have no persisted storage but to have the ability to fetch the information.

## Other Possible Approaches

Another possible approach might exist in the entity itself as having a field or column to state if the value is a persisted value or not. If you receive a non-persisted value from a form you might just throw it away. That way the entity is still probable.

Another situation might be from the contain-mapper to automatically set these. Since it is very well likely coming from the contain mapper it would make sense and then only a subsequent amount of changes would be ideal (such as adding the toArray and export to contain the extended properties).

## Other?

What other concerns do you have about the patch?