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
0 answers
Best ODM solution on PHP that support versioning
We are planning the develop of a CMS based in PHP. We are evaluating the possibility to use some open source ODM framework. We are a special interest in document versioning features.
PHPCR
We have strong expertise in Doctrine and so one good…

Fabiano Taioli
- 5,270
- 1
- 35
- 49
0
votes
1 answer
Is it possible to disable lazy loading for ODM Doctrine?
We are developing API with Silex and Doctrine (ODM) and we have object Story, which have property images.
class Story extends AbstractDocument
{
/** @MongoDB\Id */
protected $id;
/**
* @MongoDB\ReferenceMany(
* …

yAnTar
- 4,269
- 9
- 47
- 73
0
votes
2 answers
Symfony 3.2 ODM Doctrine array of MongoId's
How to make array of MongoId's in Symfony 3.2 Doctrine ODM serialized/deserialized properly ?
Document
namespace Acme\StoreBundle\Document;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
/**
* @MongoDB\Document(collection="Voter")
…

M.Z.
- 405
- 6
- 17
0
votes
1 answer
Exception Handling in Morphia (Java)
I wanted to know how to gracefully handle all exceptions that can possibly arise due to db CRUD operations.
In case of any exception, MongoException can be caught and analyzed what went wrong, it may be due to db server/ network/ time out issues .…

Vaishnavi Manjunath
- 31
- 1
- 7
0
votes
1 answer
Mongoose subdocuments possible depth
Can I use mongoose SubDocuments recursively?
I have this object:
var Player = {
city: {
energy: {
solar: 20,
fusion: 0
}
}
};
and corresponding schemas:
var PlayerSchema = new Schema({
city:…

James07
- 293
- 1
- 5
- 14
0
votes
0 answers
Mapping mongodb in dropwizard?
I am currently using hibernate in my project, and am using that to push data to SQL. However, that was just as a proof of concept, and in the long term, this project really needs to be running a NoSQL backend.
I've used mongoose with node, but this…

MickeyThreeSheds
- 986
- 4
- 23
- 42
0
votes
1 answer
Persisting a document suddenly stops returning next identifier value (ALNUM strategry)
I have Symfony 2.6 application and using doctrine-odm-bundle 3.0.2 (doctrine-odm: 1.1.2, mongodb: 1.4.0).
My document has referenceMany and referenceOne in attributes and when I create new instance of it, fill fields and persist - it goes fine in…

Ilia Shakitko
- 1,417
- 2
- 18
- 25
0
votes
2 answers
symfony mongodb odm referenceMany
Hi experts: I have a problem building a query to extract details of the document that has been referenced using 'referenceMany'. Here is the example setup of the code
class FoodItem{
/**
* @MongoDb\Id
*/
protected Id;
/**
*…

Ash
- 1
- 1
0
votes
1 answer
How to access fields of documents referenced by each other in MongoDB ODM?
Let's suppose I have two documents
Users and Purchases. All the purchase have a reference to a User, and Users have a field gender in it.
I want to select the products bought by male clients. So I have the gender and I want to iterate thought the…

Matheus Oliveira
- 587
- 3
- 10
- 33
0
votes
0 answers
Get current field value on Doctrine MongoDB ODM Update query
I ma trying to update several fields but to do that I need to update the current field value by applying a php function on it (like strtolower). But I don't know how to get the current value, i just can set a new one :
$qb->update()
…

Stiiks
- 11
- 1
- 5
0
votes
1 answer
The class 'Doctrine\ODM\MongoDB\Cursor' was not found in the chain configured namespaces AppBundle\Document
In a repository I have this code:

Arash Mousavi
- 2,110
- 4
- 25
- 47
0
votes
1 answer
How to query documents with embeded array and sort them
I have problem to query documents with embedMany.
These are my documents, where User embeds many Groups (that I call userGroups).
class User {
/**
* @MongoDB\Id
*/
protected $id;
/**
* @MongoDB\Field(type="string")
…

Fran
- 616
- 4
- 17
0
votes
1 answer
Prevent an upsert when id is specified mongodb odm
I am doing an application in Symfony2 and using the doctrine mongodb odm bundle. I created a document with an id that has strategy=NONE, like (just a snippet):
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
/**
*…

paulatumwine
- 19
- 8
0
votes
1 answer
how to install the doctrine mongodb odm via composer
I am working on a project with the php and mongodb stacks. I need the assistance of an ODM to speed up development time. A problem I have now however is this line,
$ composer require "doctrine/mongodb-odm=~1.0"
in which directory should i execute…

Sigmabooma
- 43
- 7
0
votes
1 answer
Doctrine ODM GridFS store resource
I'd like to know if there is a way to directly store a PHP resource in Doctrine ODM, something like :
$document->setFile($resource);
Or if first have to write it to a temporary file and then use it in setFile().
Thanks for your help !

ovesco
- 633
- 1
- 8
- 22