Questions tagged [odm]

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.

218 questions
0
votes
1 answer

mongodb EmbedMany strategy=set

I had a collection with an embedMany attribute using strategy=set, so an ArrayCollection was stored. However we deleted some items from the array and now there are some documents with keys not sequential integers. I need to solve this inconsistence,…
Fran
  • 616
  • 4
  • 17
0
votes
1 answer

Morphia - How to ignore loading a property if it's of a certain type?

I have a legacy property in a MongoDB collection that's stored as a boolean, but that property has evolved and it's become an Object. Is there a way in Morphia to ignore loading these properties when they are booleans? I'd just want to retrieve them…
GCarbajosa
  • 236
  • 1
  • 4
  • 13
0
votes
0 answers

ZF2/Doctrine 2 : Dynamic mapping for both ORM/ODM?

I am using Zf2 and Doctrine2. What I am trying to accomplish is to write an event subscriber that can determine which objectmanger (EntityManager/DocumentManager) is being used and dynamically map a model class to a table or document. How would I…
Jean187
  • 1
  • 1
0
votes
1 answer

update a field with the value of other field

How can I update a field with the value of other field? For example, I want to update the field updated_at with the value of the field created_at (it's like cloning fields) $dm->createQueryBuilder('MyBundle:MyService') ->update() …
Fran
  • 616
  • 4
  • 17
0
votes
1 answer

Mongoose grab a document for certain distance from a latitude-longitude coordinate

I am trying to load a document in Mongoose if it's let's say 10 kilometers from a current lat/lon coordinate. So let's say I have this object: { lat: -33.9493992, lon: 151.1114885 } And in my Mongoose database I have a collection and every…
Ariel Weinberger
  • 561
  • 1
  • 6
  • 12
0
votes
2 answers

How to view the maximum in Decision Center Business Console of IBM ODM 8.5.1?

We have a Decision Table that has 8 condition columns and 4 action coloumns. It is kind of not so comfortable for the Business User to scroll and have a look at all the columns to look at in the Business Console, as the Business Console has…
Ajay
  • 349
  • 1
  • 3
  • 11
0
votes
1 answer

Nesting and querying documents with MongoDB

I have a data structure that looks more or less like this: var city = { name: String, mayor: Person, citizens: [Person] }; I think my use case is pretty good for using MongoDB, but I have a few questions. The above model has been implemented…
blop
  • 31
  • 1
  • 7
0
votes
1 answer

Populating Mongoose schema properties with models in external files

Im trying to populate a property inside a Mongoose schema, which references a property in another external model/schema. I can get the Mongoose population/referencing working when the two models/schemas and the query are all in the same file, but I…
Justin
  • 1,959
  • 5
  • 22
  • 40
0
votes
3 answers

Doctrine ODM Query IS NULL

Is it possible to use IS NULL in Doctrine ODM Query? Only thing i found is fieldIsset(), which generates IS NOT NULL, but i cannot negate it. I've tired $queryBuilder ->andWhere() ->not() ->fieldIsset('fieldSelector'); but, resulting…
Buri
  • 71
  • 7
0
votes
2 answers

ManyToMany odm symfony2

I need to do this schema in symfony2 with odm, I have problems because the relasion is ManyToMany and I dont know How to do this. I need help. I have the entity "Persona" and entity "Direccion" and these generate the entity "Persona-has-Direccion"…
0
votes
1 answer

nested query in mongodb

How can I query for all tags in following document in mongoDB 2 or 3: { "_id" : ObjectId("55dc45017137a4e70b8b4569"), "campainName" : "", "themeName" : "theme1", "emailListName" : "eiEmails", "emailSubject" : "", "emailFrom"…
0
votes
1 answer

Doctrine ODM geoNear Distance not mapped properly (always null)

I'm having issue to get mongodb distance value in my document when I do geoNear queries. I have 3 documents involved : Venue, that embed Location, that embed Coordinates. Here is a "light" version of my model Venue : /** * Venue * *…
Julz
  • 46
  • 3
0
votes
1 answer

Dropwizard spring data couchbase

I am building a project with Dropwizard, Couchbase and ElasticSearch. I am looking for a persistence layer like an ODM for Dropwizard and CouchBase. I looked over and found Spring-data-couchbase. Can I integrate DropWizard with Spring-data-couchbase…
jsphdnl
  • 415
  • 6
  • 21
0
votes
1 answer

Sorting a collection in doctrine2

I've written the following query (that may or may not be efficient, I'm still a newbie): $collection = $this->dm->getConnection()->selectCollection('db_name', 'collection_name'); $query = array('array_name' => new…
Clinton Jooooones
  • 887
  • 3
  • 12
  • 19
0
votes
1 answer

Symfony2 and ODM flushing

in my project i'm using a document "Question" which references (Many to another document "Category") after setting the Category of a question and flushing nothing changes in my database there is my code $dm = $this->getDocumentManager(); …
Alouini Khalil
  • 655
  • 5
  • 16