Exemplos de uso de An active record em Inglês e suas traduções para o Português
{-}
-
Colloquial
-
Official
-
Medicine
-
Financial
-
Ecclesiastic
-
Ecclesiastic
-
Computer
-
Official/political
To get started, declare an Active Record class by extending yii\db\ActiveRecord.
If the user input is collected and saved into database,we would use an active record instead.
Note: When specifying rules for an active record model, we can use a special option named on.
After declaring an Active Record class, you can use it to query data from the corresponding database table.
As pessoas também se traduzem
Sometimes, you may want to pre-populate your Web form for an Active Record instance with these default values.
For example, assume Customer is an Active Record class which is associated with the customer table and name is a column of the customer table.
In Accessing Relational Data,we explained that you can access a relation property of an Active Record instance like accessing a normal object property.
For example, an Active Record object will trigger an EVENT_AFTER_INSERT event whenever it inserts a new record into the database.
Dirty Attributes¶ When you call save()to save an Active Record instance, only dirty attributes are being saved.
An Active Record class is associated with a database table,an Active Record instance corresponds to a row of that table, and an attribute of an Active Record instance represents the value of a particular column in that row.
You can differentiate the two states of an Active Record instance by checking its isNewRecord property value.
In the following example,an identity class is implemented as an Active Record class associated with the user database table.
It is often implemented as an Active Record class associated with some persistent storage for storing the user credential information.
To represent andfetch the data in the country table, create an Active Record-derived class named Country, and save it in the file models/Country. php.
Using this feature,you can assign values to multiple attributes of an Active Record instance in a single PHP statement, like shown below.
The active record pattern is an approach to accessing data in a database.
Form model and active record.
Use active record proximity discount.
Yii 2.0 introduces a lot of changes to Active Record.
It only works with Active Record model attributes.
Active Record provides an object-oriented interface for accessing and manipulating data stored in databases.
Yii automatically defines an attribute in Active Record for every column of the associated table.
Active Record automatically maintains the list of dirty attributes.
Details about AR can be found in Active Record.
There are many other changes and enhancements to Active Record.
Please refer to the Active Record section for more details.
The opposite operation to link() is unlink()which breaks an existing relationship between two Active Record instances.
Relation declarations are often reciprocal between two Active Record classes.