-
data inflating will only happen when using accessor method.
$book->is_published; // will return the raw value from database. $book->isPublished() // will return Boolean value (true or false)
-
boolean columns will generate
isXXX
accessors."published" => "isPublished()" "is_published" => "isPublished()"
-
BaseModel::load
now returns record object instead of returning a Result object:$foundBook = Book::load(321);
-
Replace
create
withcreateAndLoad
:$author = new Author; $author = $author->createAndLoad(array( 'name' => 'Z' , 'email' => 'z@z' , 'identity' => 'z' ));
-
Fix
create
andfind
logics:
- BaseModel::create now returns Result object directly and don't reload created data to the object itself.
- BaseModel::load now returns the found record instead of load the data to the object itself.
-
BaseModel::deflate
method is removed. -
BaseModel::deflateData
method is removed. -
BaseModel::getSchema
method is now static. -
Remove arguments from beforeDelete and afterDelete (the user may get the data from the data object directly)
-
createOrUpdate
is now renamed toupdateOrCreate
. -
BaseModel::load
is now static method. -
Trigger methods like
beforeCreate
,beforeUpdate
,afterUpdate
are moved to BaseRepo. -
lockWrite
=>BaseRepo::writeLock
,lockRead
=>BaseRepo::readLock
-
Renamed
BaseRepo::load
toBaseRepo::loadWith
. -
load
is now a generic method for both primary key and conditions in array. -
Added
BaseRepo::loadByKeys
for load with keys. -
BaseModel::loadByPrimaryKey
andBaseRepo::loadByPrimaryKey
are added. -
BaseModel::find
is removed. -
BaseCollection::loadQuery
method is now deprecated.
-
LazyRecord\ConfigLoader is now renamed to Maghead\Runtime\Config\FileConfigLoader
-
FileConfigLoader::load -> ConfigLoader::loadFile as a static method and return
Config
object. -
Simplify
data_source
config by assumming the default node is "master".databases: master: dsn: ...
-
Added columnClassAlias to DeclareSchema, so that we can define uuid column by using:
$this->column('uuid', 'uuid');
-
Added DeclareSchema::enableHiddenPrimaryKey option for schemas that don't need primary key column.
-
Added BaseRepo::move(BaseRepo $target) method for moving records.
-
Renamed 'schema.loader' to 'schema.finders'
-
Renamed 'getExternalSchemaLoader' to 'loadSchemaFinders'
setData()
,getData()
were renamed tosetStashedData()
,getStashedData()
column::notNull
changed tonotNull()
- Renamed
Relationship::order()
toRelationship::orderBy()
- Rebuild
Magsql\Universal\SelectQuery
from Relationship with thefilter
andwhere
. - Add a test case for relationship with custom where conditions, filter and order by and group by.
// vim:sw=2:ts=2:sts=2: