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
1a68d025
Commit
1a68d025
authored
May 03, 2014
by
Budi Irawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update broken links in db-active-record.md
- update link to query builder guide - update link to model guide - update link to behaviors guide - update link to database basic guide
parent
48b53da8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
db-active-record.md
docs/guide/db-active-record.md
+5
-5
No files found.
docs/guide/db-active-record.md
View file @
1a68d025
...
...
@@ -97,7 +97,7 @@ Connecting to Database
----------------------
Active Record uses a
[
[yii\db\Connection|DB connection
]
] to exchange data with database. By default,
it uses the
`db`
application component as the connection. As explained in
[
Database basics
](
d
atabase-basics
.md
)
,
it uses the
`db`
application component as the connection. As explained in
[
Database basics
](
d
b-dao
.md
)
,
you may configure the
`db`
component in the application configuration file like follows,
```
php
...
...
@@ -211,7 +211,7 @@ $customers = Customer::find()
### Retrieving Data in Batches
In
[
Query Builder
](
query-builder.md
)
, we have explained that you may use
*batch query*
to keep your memory
In
[
Query Builder
](
db-
query-builder.md
)
, we have explained that you may use
*batch query*
to keep your memory
usage under a limit when querying a large amount of data from database. You may use the same technique
in Active Record. For example,
...
...
@@ -286,7 +286,7 @@ Customer::updateAllCounters(['age' => 1]);
### Data Input and Validation
Because Active Record extends from
[
[yii\base\Model
]
], it supports the same data input and validation features
as described in
[
Model
](
model
.md
)
. For example, you may declare validation rules by overwriting the
as described in
[
Model
](
structure-models
.md
)
. For example, you may declare validation rules by overwriting the
[
[yii\base\Model::rules()|rules()
]
] method; you may massively assign user input data to an Active Record instance;
and you may call
[
[yii\base\Model::validate()|validate()
]
] to trigger data validation.
...
...
@@ -331,7 +331,7 @@ Active Record Life Cycles
It is important to understand the life cycles of Active Record when it is used to manipulate data in database.
These life cycles are typically associated with corresponding events which allow you to inject code
to intercept or respond to these events. They are especially useful for developing Active Record
[
behaviors
](
behaviors.md
)
.
to intercept or respond to these events. They are especially useful for developing Active Record
[
behaviors
](
b
asic-b
ehaviors.md
)
.
When instantiating a new Active Record instance, we will have the following life cycles:
...
...
@@ -1053,5 +1053,5 @@ TODO
See also
--------
-
[
Model
](
model
.md
)
-
[
Model
](
structure-models
.md
)
-
[
[yii\db\ActiveRecord
]
]
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