Merged
Conversation
| namespace atk4\data; | ||
|
|
||
| /** | ||
| * Class description? |
Member
There was a problem hiding this comment.
i wonder if we even use this.
Member
Author
There was a problem hiding this comment.
No, currently we don't use this interface anywhere. Can I delete it completely in this PR?
| if (!is_array($defaults)) { | ||
| $defaults = ['master_field' => $defaults]; | ||
| } | ||
|
|
Member
Author
There was a problem hiding this comment.
Yes, that's my mistake.
It looked that join() have same checking so I removed this "duplicated" one, but I didn't notice, that $defaults['weak'] = true; line which changes situation :(
romaninsh
added a commit
that referenced
this pull request
Jul 25, 2016
DarkSide666
pushed a commit
that referenced
this pull request
Jul 25, 2016
* Fix problem introduced in pr #70 #70 (comment) * rename internal method * implement isDirty() * clean syntax.
DarkSide666
pushed a commit
that referenced
this pull request
Jul 26, 2016
* Somewhere we forgot this. re-adding.
* $model->set('blah') will set value to title field.
* save() can now combine set/save() by taking argument
* off-load insert() functionality to set()
* insert will return "id" instead of full model.
Because cloned models are not very reliable now.
* counter is part of dsql.
* Applied fixes from StyleCI
* fix some tests
* typo
* more tests
* style
* Add is_numeric
* More field validations
* Add more numeric field check
* style
* Implement hasOne() relationship ID binding.
* Applied fixes from StyleCI
* Implements intelligent model reloading after save()
* No need to complicate things.
* Add documentation
* Applied fixes from StyleCI
* Added afterUpdateQuery / afterInsertQuery
* Implement and document how to prevent default operations on active record
* remove outdated test (since it's no longer on readme)
* Added some really nice advanced topics.
* allow hasOne()->addField('foo'); (instead of saying foo twice)
* Applied fixes from StyleCI
* allow hasOne()->addField('foo'); (instead of saying foo twice)
* Applied fixes from StyleCI
* Improve exception catching in Persistence_SQL
* Use single-table update and single-table delete with where id=X
$m->save() invokes update with a fixed ID. Also it updates joined
tables separately. Because the record has been loaded successfully
before and will be reloaded after updates (in some cases) at a risk of
failed transaction, we don't have to invoke action here.
Action is more suited for all-set update and if you use joins with
SQLite you're on your own, as it does not support join with update.
Same goes for deletion.
* Remove commented out code.
* Expanded documentation.
* merge feature/allow-updating-id
* Revert "merge feature/allow-updating-id"
This reverts commit 77733ae.
* First we need ability to avoid field persistence
If model is saving field and join is saving on top, we get problem.
* Remove misleading test.
No manual tweaking of related values (until we can figure out how to do
it safely, through join)
* avoid clash between join and field save.
* Refactor SQL persistence to use save_buffer()
* implement afterUnload hook.
* make use of afterUnload correctly.
* still call update() on persistence if joins are dirty.
* do everything except actual query if no fields are changed.
* adjust test to verify unloading and changing only joined field.
* Fix problem introduced in pr #70
#70 (comment)
* rename internal method
* implement isDirty()
* clean syntax.
* fix bug in docs.
* allow addFields(['foo','bar']) without associations.
* Validation improvement.
* addCondition('foo', ['a','b']); shouldn't touch default.
* style.
* Add support for array in $this->model
* add support for array/model definition.
* implement hasOne('foo_bar', ['class', 'default'=>123]);
* if table has alias, prepend it to sub-select aliases.
* ref('has_one_id') will no longer add weird condition if it's not loaded.
* Update test-scripts
* Style.
* style.
DarkSide666
pushed a commit
that referenced
this pull request
Aug 1, 2016
* Somewhere we forgot this. re-adding.
* $model->set('blah') will set value to title field.
* save() can now combine set/save() by taking argument
* off-load insert() functionality to set()
* insert will return "id" instead of full model.
Because cloned models are not very reliable now.
* counter is part of dsql.
* Applied fixes from StyleCI
* fix some tests
* typo
* more tests
* style
* Add is_numeric
* More field validations
* Add more numeric field check
* style
* Implement hasOne() relationship ID binding.
* Applied fixes from StyleCI
* Implements intelligent model reloading after save()
* No need to complicate things.
* Add documentation
* Applied fixes from StyleCI
* Added afterUpdateQuery / afterInsertQuery
* Implement and document how to prevent default operations on active record
* remove outdated test (since it's no longer on readme)
* Added some really nice advanced topics.
* allow hasOne()->addField('foo'); (instead of saying foo twice)
* Applied fixes from StyleCI
* allow hasOne()->addField('foo'); (instead of saying foo twice)
* Applied fixes from StyleCI
* Improve exception catching in Persistence_SQL
* Use single-table update and single-table delete with where id=X
$m->save() invokes update with a fixed ID. Also it updates joined
tables separately. Because the record has been loaded successfully
before and will be reloaded after updates (in some cases) at a risk of
failed transaction, we don't have to invoke action here.
Action is more suited for all-set update and if you use joins with
SQLite you're on your own, as it does not support join with update.
Same goes for deletion.
* Remove commented out code.
* Expanded documentation.
* merge feature/allow-updating-id
* Revert "merge feature/allow-updating-id"
This reverts commit 77733ae.
* First we need ability to avoid field persistence
If model is saving field and join is saving on top, we get problem.
* Remove misleading test.
No manual tweaking of related values (until we can figure out how to do
it safely, through join)
* avoid clash between join and field save.
* Refactor SQL persistence to use save_buffer()
* implement afterUnload hook.
* make use of afterUnload correctly.
* still call update() on persistence if joins are dirty.
* do everything except actual query if no fields are changed.
* adjust test to verify unloading and changing only joined field.
* Fix problem introduced in pr #70
#70 (comment)
* rename internal method
* implement isDirty()
* clean syntax.
* fix bug in docs.
* allow addFields(['foo','bar']) without associations.
* Validation improvement.
* addCondition('foo', ['a','b']); shouldn't touch default.
* style.
* Add support for array in $this->model
* add support for array/model definition.
* implement hasOne('foo_bar', ['class', 'default'=>123]);
* if table has alias, prepend it to sub-select aliases.
* ref('has_one_id') will no longer add weird condition if it's not loaded.
* Update test-scripts
* Style.
* style.
* dont query nonpeersistable fields
* add more advanced docs
* style
* style
* can have some advanced uses
* Add 2 more advanced topic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mostly descriptions for methods and properties are added.
But there are a few fixes too - not much, but still.