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
5
votes
1 answer

event loop is closed in a celery worker

I am facing multiple issues using an async ODM inside my celery worker First i wasn't able to init my database models using celery worker signal i am using beanie for the db connection. First Implementation from asyncer import syncify from…
H-ADJI
  • 71
  • 6
5
votes
1 answer

Python marshmallow blob/bytes field

I've been searching for a while about how to validate if a dictionary's key has value (required) and this value's type is bytes using Marshmallow, but I didn't find anything that could work. There's no "basic" field type in the Marshmallow reference…
marc
  • 527
  • 6
  • 23
5
votes
3 answers

Zend Framework 2 + Doctrine ODM, "The Class was not found in the chain configured namespaces" error?

When setting up ZF2 + ODM, I'm getting the following error: The class 'Application\Document\User' was not found in the chain configured namespaces The current setup is as the following: ZF2 stable, installed doctrine ODM via composer.phar with…
Wisu Suntoyo
  • 158
  • 1
  • 2
  • 7
4
votes
1 answer

Which MongoDB library to use for a stand-alone PHP project with Symfony?

I am leading a new project where we're convinced that MongoDB is the right choice for database. We have decided that the architecture would be SOA, so the web part will be developed using Symfony and the service part will be developed using…
Mohammad Emran
  • 872
  • 4
  • 14
4
votes
1 answer

Spring LDAP + @Entry + base attribute - not working

I have the following directory structure and am using ODM with Spring LDAP (v 2.3.1.RELEASE). The below is the directory structure am dealing with. dc=example,dc=com dc=studentBase,dc=example,dc=com I declared the base for the ldap context source…
Uresh K
  • 1,136
  • 11
  • 16
4
votes
1 answer

MongoDB ODM Indexing : How to Index multiple Compound index on a documnt that have EmbeddedDocument in itself?

I have this classes: /** * @ODM\Document * @Indexes({ * @Index(keys={"status"="asc", "regDate"="desc", "expDate"="asc", "isFeatured"="asc"}), * @Index(keys={"status"="asc", "visits.total"="asc", "visists.today"="asc"}), * …
ABS
  • 2,626
  • 3
  • 28
  • 44
4
votes
1 answer

Doctrine ODM embeded document parent reference

I am working with an embbeded document currently, and I need to get the account information from the parent document to generate an URL. How can I access the parent document from a getter on the embedded document? /** @Document */ class User { …
Cory Gwin
  • 1,243
  • 1
  • 17
  • 27
4
votes
1 answer

Symfony2 Doctrine ODM embeded class form validation

I have a Doctrine mongodb document that I have turned into a form. The document has two emebedOne documents, that are also in the form. The main document is being validated, but the embed docs are not. I am using custom asserts but I don't think…
Cory Gwin
  • 1,243
  • 1
  • 17
  • 27
4
votes
2 answers

Why was mongoose designed in this way?

I'm new to mongoose, If I want to define a model, I could use the following: var ArticleSchema = new Schema({ _id: ObjectId, title: String, content: String, time: { type: Date, default: Date.now } }); var ArticleModel =…
Kevin
  • 1,147
  • 11
  • 21
3
votes
1 answer

Error: text index required for $text query

I would like to know how to add text type indexes in my ODM configuration by XML to solve this problem and search by name. Thanks for everything. Regards. PD: I'm sorry for my English.
3
votes
1 answer

How to enable CORS set up for liberty server which is installed through Docker

I have installed IBM ODM through docker. I need to set up CORS(Cross-Origin Resource Sharing) policy for liberty server. I did CORS set up in server.xml in my local. But I didn't know how to do for docker installation. I added below lines of code in…
3
votes
1 answer

Mongoengine: Query a MapField

I have a map field that I want to query by. Something like: class User(mongoengine.Document): email = mongoengine.EmailField(required=False, unique=False) username = mongoengine.StringField(max_length=30, min_length=6, required=True,…
Chuong Ngo
  • 123
  • 1
  • 7
3
votes
2 answers

Doctrine ODM Select database at runtime

I want to use doctrine ODM for my project and I had the idea to have a seperate database for each of my clients. I want to be able to manage clients at runtime, through my API. My question now is: When I setup doctrine ODM I have to set my database…
Rogier
  • 71
  • 6
3
votes
1 answer

MongoDB Doctrine: $in needs an array - Many to Many Relation

I have some categories which contain products, whereas you can add products to a category. This is a many to many relation, whereas products do not know of their relation to a category (as it is only saved inside a category). I will first post my…
tester
  • 3,977
  • 5
  • 39
  • 59
3
votes
0 answers

On-demand load for ReferenceMany objects

I am new to the ORM but already impressed about its possibilities. When designing Facebook-like messaging system (message threads allowing multiple user chat) I have come to a problem which I don't know how to solve. After I load the MessageThread…
1
2
3
14 15