Tagged Questions
0
votes
0answers
4 views
Symfony2 unique constraint with multiple fields and mongodb
I've started working with Symfony2 and MongoDB (Doctrine ODM) and am having difficulty getting the unique validator constraint to work on multiple fields (one field references another MongoDB document ...
0
votes
2answers
10 views
Page cannot be charged because of mongodb errors Symfony 2
After i made a clear cache i refreshed my page, but this time the browser looks like he doesn't find nothing or he is somewhere blocked, because it shows up near the address that he is searching or ...
0
votes
1answer
10 views
Using authentification with DoctrineMongoDBBundle
I need your help, pls.
I'm currently working on a project where I use mongodb as database, and I began with no security in my mongo configuration of the symfony config.yml.
This is what my ...
0
votes
1answer
31 views
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 ...
0
votes
0answers
13 views
doctrine2 mongodb full text search
How to realize a query like this (full text search):
db.myDoc.runCommand( "text", { search: "Olivia" } );
in Symfony2 and Doctrine2?
0
votes
2answers
53 views
Trying to install MongoDBBundle For Symfony. using composer but it can not be resolved
Anthonys-MacBook-Air:activebook numerical25$ php composer.phar update
PHP Warning: Module 'openssl' already loaded in Unknown on line 0
Warning: Module 'openssl' already loaded in Unknown on line 0
...
1
vote
0answers
28 views
ODM Annotation : What is “strategy” attribute?
What is strategy attribute in @EmbedOne annotation? And what is the difference between its values? set , pushAll
I not find any good explain in references about Annotation in ODM,like
Annotations ...
1
vote
0answers
27 views
DoctrineMongoDB : How to create classes from database?
It's possible to generate database from classes that have writeen by this command
doctrine:mongodb:schema:create
Is there any way to do this inversely? I mean generate classes from database?
1
vote
0answers
29 views
How to annotate sub-documents in Doctrine MongoDB?
I want to implement php classes that should model the following :
(Symfony,DoctrineMongoDBBundle)
Notification Collection { from { id , fname } , to , sentDate }
Member Collection { id , fname , ...
0
votes
0answers
29 views
Get empty collection of embedded documents
I want to get a collection of embedded documents. I put data into the database like this:
$dm->getRepository('BundleUserBundle:User')->addRatedPostById($user->getId(), new RatedPost($id, ...
0
votes
1answer
50 views
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 ...
0
votes
0answers
15 views
searching for a way to filter results by a field defined in another linked table using Doctrine and MongoDB
I need to find a way to filter results from a MongoDB database, based on fields found in the current table, and a field found in another table which is linked to the current table. Tables format:
{
...
1
vote
2answers
88 views
sharing objects between doctrine2 odm and orm in symfony2 with doctrine extensions
in my project i need to share objects between orm and odm. I have an entity "Variation" and a document "Tracking". One variation can hold many trackingevents. I tried to solve it through doctrine ...
0
votes
1answer
38 views
Issue with createQueryBuilder and MongoRegex
After several research for the createquerybuilder for mongodb, I cannot solve my issue.Can you please help me?
Here is the structure of the data :
“Field1” : { “Field2”: “value1a”,“Field3” : ...
2
votes
1answer
55 views
Can't retrieve value of a field of type @Collection using DoctrineMongoDBBundle
I have the following definition of a MongoDB Document (I stripped down parts of the class for brevity):
// src/Acme/UserBundle/Document/User.php
namespace Acme\UserBundle\Document
use ...
0
votes
0answers
38 views
Reference a Embed Document in Doctrine2 and MongoDB
I have a document User that contains
/**
* @MongoDB\ReferenceOne(targetDocument="Image")
*/
private $image;
and a document ImageCollection which embed documents called Image
/**
* ...
0
votes
0answers
44 views
Get a specific value in array Mongodb and Symfony 2
I have a field ‘preferences’ in my Document, and datas like this:
{"visibility":"true","create":"2013-06-15 15:09:51","update":1371301791}
{"visibility":"false","create":"2013-06-15 ...
0
votes
0answers
36 views
DoctrineExtensions - Timestampable for Documents are not working
I ve implemented https://github.com/l3pp4rd/DoctrineExtensions in my sf2.3 projekt and all extensions are working pretty good for ORM. But i am using ODM in the same application. The Problem is, that ...
1
vote
1answer
54 views
Symfony2 and MongoDB Annotations / Mapping not recognized
I followed the steps descriped in the cookbook. But when i run doctrine:mapping:info or doctrine:generate:entities doctrine ignores my file.
Here is the code, maybe someone has an advice.
...
0
votes
0answers
108 views
MongoException: zero-length keys are not allowed, did you use $ with double quotes?
I'm using symfony2 and mongodb, until today, everything is OK, but I create a new document, and suddenly, appears this error :
"MongoException: zero-length keys are not allowed, did you use $ with ...
0
votes
1answer
72 views
FosUserBundle don't persist datas in mongodb database
I use symfony2 and the mongoDb ODM. Today I have installed FosUserBundle.
My User class is like that :
use FOS\UserBundle\Document\User as BaseUser;
use Doctrine\Common\Collections\ArrayCollection;
...
1
vote
0answers
104 views
Silex , mongo DB and updating a Document , Unique Constraint validation doesnt work properly
I'm testing silex, mongodb and Form validation. And I run into a validation issue when using MongoDB ODM and a before middelware , wether it is security related or not.
I'm given a document and have ...
0
votes
0answers
29 views
How to remove an Embed Document from an Embed Document?
I'm currently working on a project with Symfony 2 and MongoDB and I'm facing a problem while removing an Embed Document using is ID.
I'm working with Activities. An Activity embed a list of Comment ...
0
votes
1answer
328 views
Lazy load between referenced documents on MongoDB with Doctrine ODM
Helo,
firstly, please excuse my English, is not very good.
I am migrating the data container of a Symfony2 application to MongoDB, before that it run with MySQL.
I added the DoctrineMongoDBBundle ...
0
votes
0answers
103 views
Doctrine mongo ODM duplicating embedded documents in Symfony
Using Doctrine mongo ODM 1.0.0-BETA8 in Symfony 2.2.1, I'm running into troubles with the update portion of CRUD. Upon persist() the new embedded documents are being duplicated.
I ran the phpunit ...
2
votes
1answer
836 views
FOSRestBundle and JMS Serializer, error when geting JSON
I have been trying out Symfony 2.2, the FOSRest Bundle (using JMS Serializer), and Doctrine ODM using MongoDB.
After many hours of trying to figure out how to correctly setup the FOSRest Bundle I'm ...
0
votes
1answer
68 views
How to query mongodb with condition “like” in symfony2
I need to search the users in my symfony2 app
If a user enter an alphabet in search box and submit then he need to get the users starting with that alphabet.
How to achieve this?
Below code will ...
3
votes
2answers
322 views
Symfony2: document manager issue with mongodb
After installing symfony2 and mongodb by composer.json (The installations have been completed successfuly). But, when I execute the application, I get the following error message:
...
0
votes
0answers
52 views
Read collections mongodb in symfony
How can i read collections data in symfony ?otherwise have someone good tutorials about mongodb in symfony
0
votes
1answer
203 views
Symfony2 dynamic forms mongodb
Following the example as documented in the following http://symfony.com/doc/current/cookbook/form/dynamic_form_generation.html
I need to populate subcategory field according to the category ...
0
votes
2answers
263 views
How to update embedded document in MongoDB with Doctrine ODM
I'm unable to find how to update embedded documents with Doctrine Mongo ODM in Symfony2. I have a class called Page with many embedded documents "Comments" and I want to use createQueryBuilder to ...
1
vote
1answer
140 views
Mongo 2.4.1 upgrade causing Fatal error: Class 'Doctrine\MongoDB\Util\InvalidArgumentException' not found
I had everything working and I upgraded my mac ports on my mac to get the latest packages. It installed Mongo 2.4.1 and I also got boost @1.53.0_1+no_single+no_static+python27. Now when I try ...
1
vote
1answer
120 views
Changing the MongoDB collection on run time in symfony2 + doctrine
I'm using Symfony2 MongoDB + Doctrine and I want to tell doctrine to save my objects in collections with different name from the name of the class that defines the object. Also the name of the new ...
2
votes
1answer
138 views
Fatal error: Class 'Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle' not found
I'm trying to install mongodb since 3 days but each time, I had a different error message until I fix some of them and I could install mongodb for my Symfony 2.1.4 installation. So now I have this ...
2
votes
0answers
130 views
Sortable lists with Symfony2 reusable
I've rewritten this entry of the Symfony1 Cookbook http://symfony.com/legacy/doc/cookbook/1_2/en/sortable to Symfony2. My first objetive is the classic sortable list:
All the documents(MongoDB) ...
1
vote
1answer
121 views
Where/How does Symfony2 serializes and writes its session data?
To give an overview:
I have an app built on Symfony1 but I'm building the new parts with Symfony2. I've moved the login/logout actions on Symfony2 and made Symfony1 read the session data from ...
0
votes
2answers
173 views
MongoDB: how to return distinct data with filtering
I have a "Post" collection with a lot of posts and I want to retrieve distinct YearMonth value from post.published_date
Return Example:
['201303', '201301', '201212' ... ... ]
I'm using Symfony2 + ...
1
vote
1answer
87 views
Find a specific object inside the array of objects from a ReferenceMany field
I cannot find in doctrine manual how to do a very simple query. I don't know how to manage the equivalent of SQL "JOIN ..." with MongoDb.
abstract class Topic
{
/**
* @MongoDB\Id
*/
...
0
votes
0answers
131 views
DoctrineMongoDBBundle Invalid modifier specified $unset
I have this strange exception when I use MongoDB ODM in a command that saves data.
I think that it comes from configuration of the bundle in prod env. Because I don't have any problems in my dev ...
1
vote
0answers
128 views
Unable to increment value in a doctrine mongo query
Looking at the example at: http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/query-builder-api.html
I am unable to do a simple increment. That is the value of ...
0
votes
0answers
110 views
Two Step Form with Symfony2
I'm using embedded forms like that:
class MyFirstType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('field', 'text', ...
2
votes
0answers
168 views
MongoDB ODM - Group by MAX(group_id)
Let me get to the point, I am currently using the Doctrine MongoDB ODM in conjunction with Symfony2 to persist data into MongoDB.
Currently I am grouping my results by type, but I would like to group ...
0
votes
0answers
130 views
How to dereference mongodb document automaticly in Symfony2?
I can't get the object after persist it to a ReferenceOne Mongodb collection in Symfony2 (MongoDBBundle).
Document relation like this:
Thread.php
/**
* ...
1
vote
1answer
574 views
Symfony2.1 persist ArrayCollection() collection to MongoDB via EmbedMany
I'm trying to persist some data to MongoDB with Docrtrine (symfony2.1). Here are my entities:
// src/Acme/ReportsBundle/Entity/ReportCore.php
namespace Acme\ReportsBundle\Entity;
use ...
0
votes
1answer
57 views
How should i add a embeded document?
I got this structure for my game Document
Game Document.
{ "_id" : ObjectId( "51043d468ead0e0757000006" ),
"active" : true,
"created" : 1359232326,
"difficulty" : 0,
"map" : { "$ref" : ...
0
votes
1answer
111 views
How to get rid of excessive update queries generated by Doctrine MongoDB ODM?
I have following Documents:
Order with EmbedMany Orderlines
Orderline with EmbedOne Product
I have an existing Order where I want to add a new Orderline, but I'm getting two new Orderlines added when ...
0
votes
2answers
203 views
How can I sort the results of a map/reduce using Doctrine ODM
I'm having an issue trying to sort after a map reduce. The collection has statistics (like scores) with users attached, so it's finding the highest score of the user. That portion works, the sort is ...
1
vote
1answer
448 views
Store data in MongoDB and MySQL via Doctrine using the same Entity/Document-Class
I need help. Here is the situation. I am using Symfony2 + FOSRestBundle, I created my Entity-Classes to store my data in MySQL via Doctrine. I also wrote all the Controllers to get the data and ...
0
votes
0answers
244 views
Doctrine ODM single collection inheritance. Wrong document is hydrated
I have a single-collection mapped document User that has three sub classes Student, Lecturer and Admin.
Every time I load any of these sub classes a User object is returned. Can anyone help me figure ...
0
votes
1answer
170 views
Wrong distance in geonear method with Doctrine MongoDB ODM
I'm using DoctrineMongoDBBundle with Symfony2 and I've a problem with geocoordinates. This works fine but when the longitude is for example like that: 0.635467 the code doesn't work. I have more ...