refactored field and data getters and setters in model
put things in V0.1 branch
fix in __construct
collectionname finally decoupled from collection
save() works again (_beforeSave() is yet dummy)
added flatData()
in Schema, added getAttr and getRelative to support ide autocompletion...
ModelManager::compare implemented missing scenarios
tests on ModelManager() completed
removed some OBS code
flatData flattens IDs by default except for _id field
SchemaElementAttr and SchemaElementRelative renamed and now share common SchemaElement abstract
SchemaElement... renamed to SchemaField for coherence
fix typo of last commit. it's late.
consolidated load() and loadOriginalData() methods as well
implemented finder to build mongo queries, fixes in load() which now works
Model improvements:
added mergeData() to merge down dirty data and optional supplied data into originalData (useful after loads)
if a field holds referenced objects, and the value is to be set to an ID only, but the data already set contains the model with the same ID, do not overwrite the value (as they will mean the same anyway)
make sure multi fields always return array unless getting with $asIs
added ModelBubbler and support for it
fixed notice when schema relative object is empty
added direct __isset() so mustache can use these models
rewrote Model::flatData() to be simplere and support more
added Model::fieldNotNull()
fixed Collection::at() to use Model's stored _type if it is set
fixed reference saving and collection flattening in Model
added 'default' to field defs
relatives now preserve keys when saved (this might break Collection's data for now as it should be keyed by id)
new validator: schemaValidatorToList (to save unordered lists for mustache)
added SchemaValidatorToBool
Merge /var/www/maui into V0.1
Collection - fixed add() and added append()
Model - fixed getField() for multi fields when only originaldata is set
Schema - changed '@extends' to '@@extends' so '@field' extension can be specified
Validators - added own value resolution to other fields of the model