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.
Questions tagged [odm]
218 questions
0
votes
1 answer
Migrate to Mongo Morphia 2
I'm trying to migrate to Mongo Morphia 2. Documentation is very poor.
How should I rewrite the following function
return datastore.get(type, id.toUUID());
I've tried this
return datastore.find(type).field("_id_").equal(id.toUUID()).first();
I'm…

nicholas
- 413
- 1
- 4
- 7
0
votes
1 answer
calculate business days using IBM ODM
I have a requirement where the start date, time period and geography location will be passed on from the frontend to IBM ODM.
IBM ODM then based on the geographical location, calculates the next date based on the time period and the holidays/working…

newTask
- 87
- 1
- 2
- 8
0
votes
2 answers
Mongoose One to Many
I want to define a one-to-many relationship between my Category model and Product model.
product.js (Model)
const mongoose = require('mongoose');
const productSchema = mongoose.Schema({
name:{
type:String,
required:true
},
…

Serkan Eris
- 1
- 1
0
votes
0 answers
Oracle Data Modeler Table/Trigger DDL Script previews
i notice that this row inside the body of a trigger
V_SYSTIMESTAMP TIMESTAMP(6) DEFAULT SYSTIMESTAMP;
wrote in this place of the script, between the DECLARE and BEGIN keyword
DECLARE
V_SYSTIMESTAMP TIMESTAMP(6) DEFAULT…

Mario
- 1
- 2
0
votes
0 answers
MongoDB embedded subdocument mapping with a Symfony Form
I'm trying to make a form who's populate a Mongo Database. I'm using Symfony Framework and the Doctrine ODM to achieve it. And There is my problem :
I would like that the FormBuilderInterface generates 3 form fields like :
0
votes
0 answers
Using a consistent ODM for both PHP and Python
First question so please excuse any formalities I miss.
I am developing a system - the backend in Python, the frontend in PHP. The system will leverage a MongoDB database for a number of reasons. I plan to use an Object Document Mapper to make…

user14326830
- 1
- 1
0
votes
0 answers
invalid operator '$addToSet'
i have one problem. When i try to execute this query, query give me this error "invalid operator '$addToSet'".
$qb = $this->createAggregationBuilder();
$qb
->match()
->field('categories')->in($categories)
…

Venon
- 3
- 4
0
votes
1 answer
umongo, pymongo, python 3, how do i load data from reference field(s)
I'm trying to understand how and why it's so hard to load my referenced data, in unmongo/pymongo
@instance.register
class MyEntity(Document):
account = fields.ReferenceField('Account', required=True)
date = fields.DateTimeField(
…

baku
- 765
- 8
- 22
0
votes
1 answer
Python 3, ODM (umongo), difficulty with relationship fields
I'm having some trouble getting relationships fields to work in umongo. Each Document definition is in a separate file.
In this example i have two basic entities, account and target.
each target has a reference to an account.
//…

baku
- 765
- 8
- 22
0
votes
1 answer
Attempted to call an undefined method named "allowDiskUse" of class "Doctrine\ODM\MongoDB\Aggregation\Builder
I am trying to get last purchases with item, location and batch. So I tried to get ids of each by grouping. I can't use group command because it is huge data and can not be handle by group command.
$builder =…

Toney Dias
- 51
- 5
0
votes
1 answer
How to Create GeoJson Polygon in Doctrine ODM
I'd like to persist a set of Geometries in the database. Afterwards I'd like to query all Documents whose geometries intersect a given Point via Doctrine ODM.
Somehow I have no idea how to create the document-schema via doctrine. I tried several…

Joh W.
- 48
- 1
- 6
0
votes
0 answers
nested array element count based on index
my documents are like this
{"_id":"5de7fdb37d444b7a49236c83","list_id":[[3,2,4]]}
{"_id":"5de7fdb37d444b7a49236c83","list_id":[[2,4]]}
{"_id":"5de7fdb37d444b7a49236c83","list_id":[[3,2]]}
how can i count based on list id elemnts 3 , 2 ,4.
they are…

Neeraj Verma
- 2,174
- 6
- 30
- 51
0
votes
1 answer
Doctrine ODM - Updated fields provided
There is a way for automatically update all relevant fields ? If I know all data send, I can do this :
return $this->dm->createQueryBuilder(Product::class)
->findAndUpdate()
->field('_id')->equals($data['id'])
…

cisco_bro
- 81
- 2
- 7
0
votes
1 answer
mongodb LockException error on cache clear
I have recently added "doctrine/mongodb-odm-bundle": "^3.5", to my symfony 3.4 project but once I want to run any command or making first attempt to call an end point I get
LockException.php line 69:
Invalid version field type integer. Version…

neda
- 63
- 1
- 5
0
votes
1 answer
Mongodb : avoid field value duplication
I'm using symfony ODM, I have two tables one is for saving bills another is for saving last bill number.
Bills
id|bill_no |created_at
--|-------------------
1 |b2018/01|ISODate("2019-03-18T22:05:17.000+05:30")
--|-------------------
2…

Sunil Jose
- 315
- 2
- 16