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
1
vote
1 answer
Store array of doctrine Document into an Entity
I need to store an array of Document (doctrine ODM) into an Entity stored in relational database (Doctrine ORM).
I choose to store the identifiers of my Documents as a string containing a comma separated list of Document identifiers.
I found that I…

Nicolas Appriou
- 2,208
- 19
- 32
1
vote
1 answer
How to load of a Mongoengine document containing ReferenceField from kwargs
Are there any examples of instantiating a Mongoengine Document with an attribute being a ReferenceField from kwargs ?
I am looking for the same test case as "test_kwargs_simple" @…

eton_ceb
- 769
- 8
- 14
1
vote
1 answer
Doctrine ODM MongoDB EmbedOne Document not loaded
I need to store some data for our booking and thats include the customer data, which I want as embedded document within my booking document. With my current configuration all data are persisted in MongoDB, but when I load the booking document, there…

Daniel
- 539
- 4
- 25
1
vote
1 answer
Implementing (Inheriting) Promise interface in an ORM
I want to promisify an ODM/ORM. How would you implement promise interface while having other methods such as find(), insert(), update() etc. So you could do
var Users = Collection('users')
Users.find({name: 'joe'})
.then(users =>…

Gabiriele Lalasava
- 349
- 3
- 7
1
vote
0 answers
How to query by substring in a MongoDB ODM
I have this actual code
public function findCode($code_received)
{
$pellicules =
$this->createQueryBuilder()
->field('code_base')->equals($code_received)
->getQuery()
;
}
But sometimes my code…

Matheus Oliveira
- 587
- 3
- 10
- 33
1
vote
0 answers
Where are located the routine and the result features matched in OpenDroneMap?
I'm not an expert in pyhton, and I'm looking for where is located the routine and the result of the matching features of the images in OpenDroneMap. Because I want to create or add a sub routine who select random features matches of all the final…

Ruben Garcia
- 11
- 2
1
vote
1 answer
PHP Phalcon ODM mongodb where clause
I am new to mongodb concepts.
I am trying to get documents from one collection in MongoDB through PHP Phalcon's ODM and more specifically the "aggregate" method of Phalcon\Mvc\Collection. The MySQL equivalent of what I'm trying to do looks like…

harv3s7er
- 73
- 6
1
vote
1 answer
doctrine odm query reference many field
Take the documentation example:
/** @Document */
class BlogPost
{
// ...
/** @ReferenceOne(targetDocument="User", inversedBy="posts") */
private $user;
}
/** @Document */
class User
{
// ...
/**…

bitgandtter
- 2,179
- 6
- 31
- 60
1
vote
0 answers
doctrine odm embedded documents wont load automatically
I have this basic document and embedded document inside it i took it from the official doc
User:
type: document
embedOne:
address:
targetDocument: Address
Address:
type: embeddedDocument
When i load the user document i expect the…

bitgandtter
- 2,179
- 6
- 31
- 60
1
vote
1 answer
How connect phalcon (ODM) to Mongodb using new mongodb driver
This is my connection code using old mongo php driver
$di->setShared('mongo', function () use ($config) {
$mongoConfig = $config->mongo->toArray();
$mongo = new MongoClient("mongodb://". $mongoConfig['host'] .":".$mongoConfig['port']);
…

Marcelito Costa
- 318
- 4
- 10
1
vote
0 answers
NodeJS Mongoose Not Save Data
My system will create around 30 collection for every hour. My server get thousands request for one hour. I have big data and multiple collections. And i use MongoDB-NodeJS for saving data.
The modelControl function of pariteModel class at the…

Mesuti
- 878
- 1
- 13
- 29
1
vote
1 answer
Error Install Doctrine-odm MongoDb in Symfony
I have few problems with mongoDb and Symfony.
I installed php driver 1.6.12 and I want to install mongoDbBundle
add these lines in my composer.json
{
"require": {
"doctrine/mongodb-odm": "~1.0",
"doctrine/mongodb-odm-bundle":…

monkeyUser
- 4,301
- 7
- 46
- 95
1
vote
1 answer
Mongoose Schema default value for ObjectId
I have a collection of warehouse upgrades. It is predefined "template" collection containing for example max_capacity, level and price. Then I have warehouse_levels collection, this contains different indexes to warehouse_upgrades for different…

James07
- 293
- 1
- 5
- 14
1
vote
0 answers
doctrine ODM / Mongo DB and Object References
for the life of me, I can not find the answer to this problem. So, I'll ask here.
Let's say I have 3 document types in my mongo.
// provider
{
$id: ObjectId('xxx'),
"name": "some name",
}
// category
{
$id: ObjectId('yyy'),
"name":…
1
vote
0 answers
Mongo ODM @Collection Annotation Usage
I am unsure on how to use the @Collection annotation in Mongo. As you know, I am trying to save a simple array in a Mongo document.
So in my document:
/**
* @MongoDB\Collection
*/
protected $counties = array();
/**
* Set…

kratos
- 2,465
- 2
- 27
- 45