Wiki articles tagged with "mongodb"

Showing 1-4 of 4 items.

MongoDB's RBAC support class extending BaseManager

Created 9 years ago by edoardo849, updated 9 years ago by edoardo849.

Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components and modify your params.php` file like this:

0 0
4 followers
Viewed: 13 423 times
Version: 2.0
Category: How-tos
Tags: mongodb, rbac, yii2

Auto-update denormalized attributes with MongoDb and Yii2

Created 10 years ago by edoardo849, updated 9 years ago by CeBe.

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3 followers
Viewed: 17 534 times
Version: 2.0
Category: Tips

MongoDb's embedded documents mapping for ActiveRecord in Yii2

Created 10 years ago by edoardo849, updated 9 years ago by CeBe.

suppose to have in Mongo a collection "user" like:

4 0
7 followers
Viewed: 27 978 times
Version: 2.0
Category: How-tos

Upload files in Yii2 with MongoDb and GridFs

Created 10 years ago by edoardo849, updated 4 years ago by pceuropa.

Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

6 0
6 followers
Viewed: 36 010 times
Version: 2.0
Category: How-tos