3
votes
Equivalent of Records in Craft 3?
/**
* Class SearchRelationship record
*
* @property int $id
* @property int $aaa
* @property int $bbb
* @property string $ccc
*/
class SearchRelationship extends ActiveRecord
{
/**
* @...
3
votes
Accepted
What do multiple columns of a record being set to unique mean?
It means that no combination of those two columns can be the same in the table stated in the getTableName() of your record.
3
votes
Accepted
How many users can Craft handle?
It depends more on how you are going to create and display them. I had to import 20k elements this weekend and I had to be careful to store them step by step.
Depending on your server/hardware - you ...
2
votes
Accepted
Update record definition after plugin is already installed
If you want to change database schema after a plugin has already been installed, the way to do it is through migrations.
You can see many examples of this in Craft in the craft/app/migrations folder.
2
votes
Accepted
Best way to handle large amount of records
In sake of performance it would be better to create a custom field type and one or two record(s).
You can store your information/records in a separate table and link them with their ID to a category....
2
votes
Tables not created when plugin installed
You need to have a migration in your plugin to install the necessary tables and perform other plugin installation/uninstallation actions.
Just because you have a Records/Model class doesn't mean your ...
2
votes
::model(), ::populateModel() and ::populateModels() in Craft 3
I can answer my own question with some information I've found to help anyone else for Craft 2 related porting.
The populateModel() and populateModels() methods used to exist on the BaseModel class in ...
2
votes
Accepted
Plugin record no dateUpdated and uid
This might not be the answer you were looking for, but I don't think you need to go to great lengths trying to achieve something that in my opinion is not necessary. While it might seem to be not &...
1
vote
How to define table attribute in the record file
So how can I define table's attributes in Craft 3 to complete following code:
You don't.
By just defining the table name, that gives Yii enough information to reflect on the underlying columns for ...
1
vote
Paginate records?
You should be able to use paginate. In my installation, I paginate through blog articles:
{% paginate craft.entries.section('articles').limit(4) as pageInfo, articles %}
Then, you can just access ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
records × 49plugin-development × 31
models × 17
database × 12
plugins × 5
relations × 5
attribute × 4
validation × 3
craft3 × 2
templating × 2
migration × 2
custom-field × 2
queries × 2
categories × 1
users × 1
config × 1
elementcriteriamodel × 1
events × 1
craft2 × 1
javascript × 1
mysql × 1
installation × 1
json × 1
updates × 1
sorting × 1