Questions tagged [odm]

Object Document Mapper Is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language. There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to create their own ODM tools.

218 questions
3
votes
3 answers

Ming 0.3.2 Installs and Imports but Crashes

After installing Ming 0.3.2, I tested the installation by running the following code: >>> from ming.datastore import DataStore >>> bind = DataStore('mongodb://localhost:27017/', database='tutorial') Traceback (most recent call last): File…
2
votes
0 answers

How do I create custom reference types in Doctrine ODM V1?

Is there any way to have a slightly custom reference (@ReferenceOne, @ReferenceMany) in Doctrine MongoDB ODM? For example, @ReferenceOneWithTs would keep a timestamp field to tell when the reference was created, or @ReferenceManyWithName will have…
Omer
  • 582
  • 3
  • 14
  • 24
2
votes
1 answer

Doctrine 2 ODM MongoDB storing images in GridFS from memory

i want to store uploaded files in mongodb as GridFsFile. Im using the doctrine 2 odm. it works fine when i read a file from disk and store it. But what i would like to achieve is to avoid storing the uploaded files anywhere on file system. Is it…
bazo
  • 745
  • 9
  • 26
2
votes
3 answers

Doctrine 2 ORM and MongoDB ODM mapping on the same class

Is it possible to map the same class to both ORM and ODM using annotations? We are deciding what to use so we want to do some performance measurment and we also want to be able to switch the persistance mappers easily. I have already done the…
bazo
  • 745
  • 9
  • 26
2
votes
1 answer

Asynchronous ODM of Mongodb for FastAPI / python in general

I had been using motor https://motor.readthedocs.io/en/stable/ as my driver in fastapi application to handle asynchronous db calls. But with scale, i required proper ODM support in mongodb. I had gone through multiple available odm options like…
2
votes
1 answer

How to separate umongo's object document models from the main web app or how to avoid calling @instance.register where document models are defined?

While creating a web app using Flask or FastAPI, there would be a main.py file that basically instantiates and runs everything. I think that is also the right place for the database connections and initialization. So ideally I'd like to have a…
jar
  • 2,646
  • 1
  • 22
  • 47
2
votes
0 answers

Symfony how to mongo-odm-aggregation-bundle

I am confused to ask this question but I can not find a solution to my problem. I use the mongo-odm-agregation-bundle to perform an aggregate on my data. I don't know how to use correctly this bundle, the documentation is not sufficiently explicit…
2
votes
1 answer

Use mongo operator $and in Phalcon\Mvc\Collection

im trying to use the operator $and of MongoDB applied to the Phalcon\Mvc\Collection as follow: $documents = Staff::find( $condition); with array $condition having the "role" like this: $condition["role"] = [ "\$regex" =>…
Lê Gia Lễ
  • 510
  • 3
  • 10
  • 24
2
votes
1 answer

Should be an input data object cloned before it's processed by application logic?

I work on an open source project - object document mapper aka. ODM in javascript and am facing a design decision I struggle with (rather simple but not easy) . In the ODM you can define a Model object which describes your data document in a…
user2694295
  • 366
  • 6
  • 16
2
votes
1 answer

How to "group by" field "count" in mongodb querybuilder?

I want to classify cities with the products they have. I have two documents: Product and city. The product has its ID and a reference to a city document: Product(id) City P1 ------------ Atlanta P2 ------------ New York …
Matheus Oliveira
  • 587
  • 3
  • 10
  • 33
2
votes
1 answer

Doctrine EventListener onFlush access to old Document

I can access to the updated document in onFlush eventListerner of Doctrine2. I want complete old document to store it elsewhere as old state. public function onFlush(OnFlushEventArgs $eventArgs) { $dm =…
Arash Mousavi
  • 2,110
  • 4
  • 25
  • 47
2
votes
0 answers

IBM ODM Rules - JUnit Excel Scenario File Testing

I am new to IBM ODM. We are planning to test the excel sheet scenarios using JUnit from Rule Designer(DVS Testing with JUnit).Am using ODM Version 8.8. I would like to know the advantages of this approach. We are already trying the test scenarios…
Nimmi
  • 31
  • 4
2
votes
0 answers

Query in Doctrine (ODM) not working

I have a problem with a query in Doctrine and MongoDB (ODM). This is my document example: [ { "id": "some_id", "country": "Germany", "cities": [{ "city": "Munich" }, { "city": "Berlin" }, { "city":…
alvarezsh
  • 503
  • 3
  • 8
  • 21
2
votes
0 answers

How to use an operator $exists inside an $elemMatch using MongoEngine syntax

Is it possible to use an $exists operator inside an $elemMatch using MongoEngine? I would like to do something like: Location.objects(accessPoints__match={'deletedAt__exists': True, 'mac': "AC-86-74-xx-xx-xx"}) I think MongoEngine assumes that…
PachinSV
  • 3,680
  • 2
  • 29
  • 41
2
votes
0 answers

Devise ORM/ODM Adapter for Dynamoid (Rails + DynamoDB + Devise)

I'm working on Rails + AWS DynamoDB using Dynamoid gem and it works well. The experience is almost same as Rails + MongoDB using Mongoid gem. The problem is when using Devise in DynamoDB. For Rails + MongoDB + Devise, I follow this step…
gizipp
  • 41
  • 1
  • 5
1 2
3
14 15