- Issue created by @webberly
- ๐ฎ๐ณIndia Shreya_98
Shreya_th โ made their first commit to this issueโs fork.
- Assigned to Shreya_98
- @shreya_th opened merge request.
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 1:09pm 26 October 2023 - ๐ฎ๐ณIndia Shreya_98
Hi @webberly,
I have fixed this issue and also created MR for this issue. Kindly review the changes. - Status changed to Postponed: needs info
about 1 year ago 3:57pm 26 October 2023 - ๐ซ๐ทFrance fgm Paris, France
This MR does not appear to be related to the document at all, does it ?
Thank you Shreya_th that worked, Fgm, Im using php7.4 and the latest dev version of mongodv and drupal 9.5.7.
Is there any examples of how i can use mongodb to store taxonomy terms or commerce entities?
Thank you.- ๐ฎ๐ณIndia Shreya_98
@webberly ,
We can use MongoDB to create collections for each entity type. Here's an example for storing product data:{
"_id": 1,
"name": "Product Name",
"description": "Product description",
"price": 29.99,
"category": "Electronics",
"tags": ["electronics", "gadgets", "tech"],
"stock_quantity": 100
} Thank you Shreya_th,
I can see the id needs to have an underscore preceding in the object, but how do I get to that stage?
If i want to store commerce_Product or variation types or attributes in mongodb, how do i change the existing storage? in hook_entity_type_alter and ->setstorageclass(), Do i write a whole new class or use a mongodb class?- ๐ซ๐ทFrance fgm Paris, France
Thanks for the details:
- Installation should not have been possible with PHP 7.4 as the module no longer supports it: the composer file requires PHP >= 8.0. How did you install the module ? Composer should have blocked the install because of that requirement.
- With Drupal 9 EOL being in just 4 days now, the ongoing requirements for 8.x-2.x will be Drupal 10 and PHP 8.2. While technically allowed with 8.x-2.1, Drupal 9 is no longer supported
- Versions in the 8.x-2.x do not allow storing entity/field data in MongoDB: they only offer a logger, keyvalue, and queue services.
- To store everything else in MongoDB, you need either the ttps://gitlab.com/daffie/mongodb867 repo or the complete https://gitlab.com/daffie/drumongous distribution. You can ask about those in the #mongodb slack channel, but keep in mind these are experimental, as explained by their author @daffie in his talks at DrupalDevDays Vienna and DrupalCon Lille
In summary:
- If you want to store entity/field data in MongoDB you will need the experimental versions, not 8.x-2.x
- If you want the stable supported version
- you will not be able to store entity/field data in MongoDB, only logs, KV and queue
- you will have to use PHP 8.2 and Drupal 10.x
- Status changed to Fixed
12 months ago 1:57pm 10 January 2024 - ๐ซ๐ทFrance fgm Paris, France
That was actually a support issue.
No answer from OP and other user in over two months. Assuming fixed by last answer.
Automatically closed - issue fixed for 2 weeks with no activity.