data
data copied to clipboard
Data Access PHP Framework for SQL & high-latency databases
``` class Order extends \Atk4\Data\Model { protected function init(): void { parent::init(); $this->hasMany('order_doc', ['model' => [OrderDoc::class ]]); } } class OrderDoc extends \Atk4\Data\Model { protected function init(): void { parent::init();...
Improve method chaining. All `addField` methods are adding named fields, thus the result can be easily obtained with `Model::getField` method when needed. also see the discussion below, especially the summary...
discovered in https://github.com/atk4/data/commit/2f93908c6d77a969712e635148931997b1fa8a81#diff-bff9bb1a3b20aa2d2fb5c6aa8c3a31d22dcbba69bdebc2ec936bb0b45d479febR74 all tests must pass even if `reloadAfterSave` is enabled (default)
fixes #950, especially `SUM(1) = bind` see https://dba.stackexchange.com/questions/311555/sqlite-spec-4-2-type-conversions-prior-to-comparison the actual issue is: http://sqlfiddle.com/#!5/e9c19/9 (datype cannot be determined before the query is run, as the INTEGER/REAL datatype might be not large...
The concept unifies the persistence query objects which must extend `Persistence\AbstractQuery` In the case of Persistence\Sql\Query the calls are forwarded to underlying DSQL object. This abstracts the link to the...
needs https://github.com/doctrine/dbal/issues/5046 (closed) https://github.com/doctrine/dbal/pull/5524 (closed) - landed as https://github.com/doctrine/dbal/pull/5617 https://github.com/doctrine/dbal/pull/5501 (closed) might be needed as well
Also, the data from CTE should be editable also add support for Query with CTE nesting
Currently we do not support joining tables by non-id fields because we don't know how to save records in such case. See #802 and "Joining tables on non-id fields is...
TODO for SqlExpressionField, I think we need to always wrap the previously added fields in WITH SQL fixes https://github.com/atk4/data/issues/682 also improve overall performance