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
Change a field type using Doctrine ODM
I have a document where I used to have a field that stores a string, but I now I want to change it to store hashes. The problem is with the old documents when I try to retrieve one of those, I get the following error:
Catchable Fatal Error:…

PachinSV
- 3,680
- 2
- 29
- 41
0
votes
1 answer
FOSUserBundle using ORM and FOSMessageBundle using MongoDB
I need implement FOSUserBundle using ORM database and FOSMessageBundle using MongoDB (ODM database). Is it posible?
I configure FOSUserBundle using ORM and works.
I am triying to configure FOSMessageBundle using the documentation…

Adolfo Luzardo Cabrera
- 595
- 6
- 14
0
votes
1 answer
Phalcon $elementMatch
I'm trying to find with $elementMatch condition, but unfortionatly, nothing works correctly:
http://forum.phalconphp.com/discussion/6033/
$result = Hotel::findFirst(array(
'$elementMatch' => array(
array('sellingCodes' =>…

nyotsov
- 93
- 7
0
votes
1 answer
Doctrine ODM(MongoDB) - Delete the data createdOn today
I am working in doctrine ODM. I am new to doctrine.. Actually i am trying to delete all the data from a collection which are all inserted today using querybuilder. But i am not able to do that. Please help me on this. The querybuilder what i am…

Vinoth Babu
- 6,724
- 10
- 36
- 55
0
votes
2 answers
Symfony2 Mongodb : save object into another
I'm using Symfony2 with mongodb & doctrine-odm which have a strange behavior. I have an importFile document and a context document. The contexte document is referenced into the importFile one as below :
/**
* @MongoDB\Document
*/
class…

user2733521
- 439
- 5
- 22
0
votes
1 answer
In Doctrine, what does dollar sign mean in dot syntax like, property.$.otherProperty?
In Doctrine, what does dollar sign mean in dot syntax like, property.$.otherProperty?
I noticed in /Doctrine/ODM/MongoDB/Tests/Query there is an interesting queryBuilder argument, field('phonenumbers.$.phonenumber') where, in the User class,…

CommaToast
- 11,370
- 7
- 54
- 69
0
votes
1 answer
Symfony: Strings containing only numbers persist as numbers, fail queries
I'm using Symfony and Mongo. I have documents for each of my mongo collections. In the documents I defined all fields to be strings, even though some of them typically contain numerical values.
I perform searches in these collections and filter them…

ecc
- 1,490
- 1
- 17
- 42
0
votes
1 answer
Convert console command to ODM
I'm trying to run this exact query in php with mongodb-ODM
db.runCommand ( { distinct: "messages",
key: "conversation",
query: { conversation: { $in: ["533f28c9211b6f7e448b4567","52cb29b0211b6fd9248b456b"] } }
…

Aysennoussi
- 3,720
- 3
- 36
- 60
0
votes
0 answers
Storing array as list doesn't work
I'm trying to insert an array in my mongo collection like this
field:[tag1,tag2,tag3]
my mapping is
/**
* @MongoDB\Hash
*/
protected $field=array();
I'm inserting like this in PHP :
$message->setField([$idme,$to]);
While I want it stored as…

Aysennoussi
- 3,720
- 3
- 36
- 60
0
votes
1 answer
PHPCR Jackalope / Jackrabbit performance and compatibility (Symfony CMF)
Anticipating possible future issues, I decided to use Java-based Jackrabbit implementation (since it's the system with the highest performance according to the Symfony CMF docs) for the storage purposes. For the portal I'm developing I use at the…

forsberg
- 1,681
- 1
- 21
- 27
0
votes
1 answer
How to query for models containing all given values in an array field? [Doctrine ORM and ODM QueryBuilder]
Given model Post which has a field tags which holds an array of strings, eg:
Post:
id: 1
tags: ['a', 'b', 'c']
Post:
id: 2
tags: ['a', 'z']
How to construct a query, to get models containing all values from array ['a', 'b'] (in this…

ioleo
- 4,697
- 6
- 48
- 60
0
votes
1 answer
Is modeling relationships in MongoDB using an ODM (Ming) an Anti-Pattern?
I'm interested in using Ming to model my 100+ GB data set which is largely non-relational data (signals measured in a lab) with some "relational" meta-data (e.g. experiment name) in MongoDB. This is not a question about whether or not I should be…

Charlie
- 2,004
- 6
- 20
- 40
0
votes
1 answer
Configure FOSMessage Bundle with ODM (MongoDB) in Symfony2
I am working on connecting FOSmessage bundle with ODM (mongoDB). I have follow
this link [1]: https://github.com/FriendsOfSymfony/FOSMessageBundle/blob/master/Resources/doc/01b-odm-models.md but I am getting The class…

pradeep kumar
- 1
- 1
0
votes
0 answers
ZF2 Console controller and Doctrine2 ODM
I'm having issues to use a ConsoleController and make queries to the database using Doctrine ODM.
The controller works fine, displays the banner and reacts to the different commands and variables passed to it.
Also, through the browser, the app…

Martín Peverelli
- 328
- 2
- 13
0
votes
1 answer
Doctrine ODM - get entities by embedMany collection entities
I have collection with embedMany field "properties"
{
"title": "Castle in Scotland",
"properties": {
"0": {
"_id": NumberInt(13),
"propType": {
"$ref": "listing_property_types",
"$id": NumberInt(9),
…

GFB
- 345
- 1
- 5
- 15