Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
eddd6642
Commit
eddd6642
authored
May 22, 2014
by
Michael Härtl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 3532: Add note about AR default values to upgrade notes
parent
1a848453
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
intro-upgrade-from-v1.md
docs/guide/intro-upgrade-from-v1.md
+11
-0
No files found.
docs/guide/intro-upgrade-from-v1.md
View file @
eddd6642
...
...
@@ -447,6 +447,17 @@ as arrays, which can significantly reduce the needed CPU time and memory if larg
$customers
=
Customer
::
find
()
->
asArray
()
->
all
();
```
Another change is that you can't define attribute default values through public properties anymore.
If you need those, you should set them in the init method of your record class.
```
php
public
function
init
()
{
parent
::
init
();
$this
->
status
=
self
::
STATUS_NEW
;
}
```
There are many other changes and enhancements to Active Record. Please refer to
the
[
Active Record
](
db-active-record.md
)
section for more details.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment