Skip to main content
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 { /** * @...
Brad Bell's user avatar
  • 67.6k
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.
Luke Pearce's user avatar
  • 3,863
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 ...
Robin Schambach's user avatar
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.
Brad Bell's user avatar
  • 67.6k
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....
Robin Schambach's user avatar
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 ...
RomanAvr's user avatar
  • 712
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 ...
James White's user avatar
  • 1,191
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 &...
MisterMike's user avatar
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 ...
Brad Bell's user avatar
  • 67.6k
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 ...
Adam Hopkinson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible