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
Cannot use Collection as Model PhalconPHP
I'm trying to setup MongoDB collection for my PhalconPHP application.
I have the mongo and collectionManager set up.
$di->set('collectionManager', function(){
return new Phalcon\Mvc\Collection\Manager();
}, true);
//MongoDB…

VladoM
- 64
- 3
0
votes
1 answer
how to get single result using mongo odm?
i make a setting action in which i used doctrine query for getting single result but it returns null while data exist in database,how i get single result?here is my code:
public function settingsAction()
{
$id = (int)…

Muhammad Arif
- 1,014
- 3
- 22
- 56
0
votes
1 answer
Set the minDistance in geonear
I'm trying to have a geo-pagination system.
I refeer to this article
Blog article from mongoDB
My problem is that I'm using doctrine MongoDB and i don't seem to find how to set minDistance field in Doctrine MongoDB
My Mongo version is 2.4.8

Aysennoussi
- 3,720
- 3
- 36
- 60
0
votes
1 answer
Doctrine ODM Document Reuse
Scenario: In my PHP slim app, I have a class which is used for validation and if that passes I then use a "controller" to perform RESTful style updates.
My question is: If I perform a query and then in an unrelated part of the code perform a query…

Ben
- 251
- 1
- 5
- 13
0
votes
1 answer
How to create sample of Mongoose Model all null values?
Image you have this schema:
var userSchema = new Schema({
name: String,
schools: [{
level: String,
name: String,
timeInterval: {
start: {type:Date,default:Date.now},
end:…

190290000 Ruble Man
- 2,173
- 1
- 20
- 25
0
votes
1 answer
Doctrine MongoDB reference hydrate false and prime
Good evening everyone.
Please, help me with my Doctrine/Mongo problem.
I have a document, which has a ReferenceOne to another document and ReferenceMany to other document.
So I need to run one query to get full document tree for my first document as…

Serge Velikan
- 1,131
- 15
- 31
0
votes
1 answer
Doctrine2 ODM Count() does not count integer values
i m using Zendframework2 and using count function to count the number of values, it fails when i try to count the integer values
$q = $dm->createQueryBuilder('Admin\Document\Institution')
->field('id')->notEqual($id)
…

Shahbaz
- 3,433
- 1
- 26
- 43
0
votes
1 answer
MongoDB With Symfony2
I have to make an auto suggest on city level so that i have list cities of mapped with respective countries like USA => ( "New York", "Dallas", "Los Angeles" .....)
what i need is to save it in mongodb with symfony2 mapping method.
I searched a lot…

Sam
- 376
- 3
- 10
0
votes
1 answer
Document to search other documents with ODM and ZF2
I'm building a ZF2+mongoDB+Doctrine ODM app.
I'm trying to use some patterns, and I need for Documents to be able to fetch other Documents from the database.
My problem is that I can't get a DocumentManager instance inside a Document. I can only get…

Martín Peverelli
- 328
- 2
- 13
0
votes
1 answer
Doctrine MongoDB ODM do not change state of referenced object
I'm Using Symfony2 with the DoctrineMongoDB Bundle. I made a service that receives Informations in JSON Format (Objects).
The Object I'm sending got a property for referencing to another Object in a different collection in the Database.
Changing the…

doggy
- 1
- 2
0
votes
0 answers
Query Multilayer in mongoDB
I have a mongoDB application running on symfony2.2 framework.
The Database design is as follows.
Table
User,City,State
1 user belongs to one city.
1 city belongs to one state.
now I need to query all the users who belong to state A.
This is what…

user1584103
- 193
- 2
- 15
0
votes
0 answers
Easy traversal through objects
I am working on a project in Symfony2.2 and MongoDB.
Currently I can retrieve all the Objects from my Database and traverse them to get the desired object.
$dm = $this->get('doctrine_mongodb')->getManager();
$users =…

Shrujan Shetty
- 2,298
- 3
- 27
- 44
0
votes
2 answers
Symfony2,Doctrine,MongoDb: Unable to pass query result to view
I'm trying to work my way through the DoctrineMongoDBBundle tutorial in the Symfony documentation book. I have created the test "Products" collection, and am able to insert into it without any problems, however, I can't seem to be able to read back…

user2566987
- 308
- 1
- 9
0
votes
2 answers
MongoDB Doctrine ODM change the collection name for a document at run time
I have to create collection for users per each day they register so if I have 5 users and 2 register on 2013-03-02 and 3 have register on 2013-03-03 I will have 2 collections
The user is declare in a YML file with no collection
In the project I do…

Gafitescu Daniel
- 404
- 4
- 7
0
votes
2 answers
How to get exact document result from key value type of embedded documents
Let say I have this kind of document structured, the attributes field will be the embedded document
and I've already indexed the attributes.key and…