All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning*.
* Until 3.0.0, patch versions equal to 0 were omitted.
5.1.2 - 2018-07-08
- ModelIterator now implements Countable
5.1.1 - 2018-07-07
getTypedColumns()
returns an associative array
- When adding changes in a different order from
COLUMNS
, data was being saved in wrong columns in the database - Column types are only used when fetching data, and must be avoided when sending data to the database
5.1.0 - 2018-05-28
- Repository title
- Note about foreign classes
getColumns()
getTypedColumns()
addColumnTypeKeys()
COLUMNS
may define prefered data type
getRequiredColumns()
was returning a non sequential index- Comparison operator
- Typos
5.0.0 - 2018-03-29
getStampColumns()
isDeleted()
- Update dependencies
- Rewrite MedooConnection
- Update config file example
save()
andupdate()
always reload from Database to ensure data integrity and have better return valuesdelete()
only resets the model and removes it from from ModelManager if successful- All
STAMP_COLUMNS
are implicitly optional
dataCleanup()
- Indentation
updateStampColumns()
subset filteringsave()
4.3.0 - 2018-03-08
- Update dependencies:
- ReadOnlyModelException extends
aryelgois\Utils\Exceptions\ReadOnlyException
4.2.0 - 2018-02-25
- Links in README
- Model methods:
getData()
- Update aryelgois/utils
jsonSerialize()
DocBlock and description
4.1.1 - 2018-02-22
- Rename
getFormatedDocument()
togetFormattedDocument()
- Rename
formated
toformatted
4.1.0 - 2018-02-17
- Model methods:
getDocumentType()
getFormatedDocument()
4.0.0 - 2018-02-17
- Model
fill()
example - Model methods:
checkUnknownColumn()
checkReadOnly()
getIterator()
getRequiredColumns()
isFresh()
onColumnChange()
undo()
- Update aryelgois/utils
- Forbid assigning a fresh foreign model
validateHook()
only receives the data to be validated- Person methods
- Rename Hook to Event
- Improve exceptions
setMultiple()
- ModelIterator and ModelManager
__construct()
: Ensure a model class is used, and not a model instance - Delete fresh soft model
3.1.1 - 2018-02-09
- Warning for
array_flip()
in aryelgois/utilsUtils::arrayBlacklist()
whenAUTO_INCREMENT
is null
3.1.0 - 2018-02-09
- README Index
- Sections about
Reusing models
andOther methods
- Model methods:
fill()
getChangedColumns()
getInstance()
onFirstSaveHook()
onSaveHook()
- Move changelog to its own file
- Move
Reloading the model
section to Other methods - Move paragraphs from Advanced section to Other methods
- Header level in Advanced section
- Model
setMultiple()
- pt_BR section in README
3.0 - 2018-01-31
- Quote about indirection
- FullAddress model
- Previous changelog
3.0-alpha - 2018-01-31
- Year 2018 in LICENSE
- Models are restored to ModelManager after
unserialize()
- Models can be converted
toArray()
- Constant
STAMP_COLUMNS
- Columns with timestamp controlled by SQL Database can be ignored
- Bump catfan/Medoo version
- Model reorganized
- Rename
DATABASE_NAME_KEY
toDATABASE
- Foreigns are loaded on demand
SOFT_DELETE
is implicitly optional- ModelManager
$models
is private - FullAddress went one subnamespace upper
- README partially rewritten/reorganized
- composer.json
suggest
- FullAddress model
- Some models in the namespace
aryelgois\Medools\Models\Address
- Problem when saving a model without a value for its soft delete column, which
is controlled by
SOFT_DELETE_MODE
, the expected was to work - After setting a column to null,
__get()
returned the old value
2.1 - 2018-01-06
Medools
keyword- composer.json
suggest
key
- Namespace
aryelgois\Medools\Models\Address
, in favor to the same one inaryelgois\Databases\Models\Address
- README Install section
- composer.json
autoload
indentaion - Backslash in DocBlocks
2.0 - 2017-11-18
- ModelManager. This class provides a way to reduce object duplication, keeping a track of loaded models, which are reused when referenced as foreign keys
- Models are JsonSerializable, so you can simply pass a model to
json_encode()
- Bump aryelgois/utils version
- ModelIterator uses MedooConnection
- Model methods. The most notable are
get()
andset()
, replaced with PHP magic methods, andgetForeign()
, integrated with__get()
to create a chain
- README
- Normalize some variable names
- Make MedooConnection abstract
1.0 - 2017-11-09
I should have started from 0.1.0..
- Dependency aryelgois/utils
- README
- Base classes: Model, MedooConnection, ModelIterator
- Internal classes: Exceptions and Traits
- Example models: Address and Person
- Example of config file
- Project name changed from
medoo-wrapper
toMedools
. It is a mix of Medoo and models
- DatabaseObject.php