Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Sokil
@sokil
Look at issue
Jakob Murko
@sraka1
Hey
One question
I'm not really sure I properly understand the caching component
You're binding it to a collection
But then you write arbitrary key/value pairs?
How does it differ from a standard cache such as memcached/redis?
Thanks
Sokil
@sokil
There is no difference. Its just cache based on mongodb. And it has some methods to invalidate cache by tags in the box.
Sokil
@sokil
And collection used as storage for values. If value is array, it may be of any structure
Daniel Coulbourne
@DanielCoulbourne
@sokil you here?
Sokil
@sokil
you can leave questions here evan i'm offline
Dan Rec
@DanRec46
i've used $collection->getDistinct('fieldname'); ..... how to use distinct with where ?
Sokil
@sokil
Before 1.12.6 allowed only Expression object, since this version - arrays and callables also. Some examples at https://github.com/sokil/php-mongo/blob/master/README.md#distinct-values
mayurmakwana
@mayurmakwana
Hello
i followed this step but
not working script what should i do for it ??
Sokil
@sokil
can you explain more concrete? Your link about installing MongoDB on Ubuntu, this chat is about ODM for MongoDB written in PHP
Vinícius
@vinidotdev
hello, anybody here?
Sokil
@sokil
yes)
Neri J. Jakubowski Junior
@nerijunior
@sokil Congratulations! This package is awesome!
Sokil
@sokil
Glad to hear that)
Neri J. Jakubowski Junior
@nerijunior
@sokil How can I set the cursor timeout? like: $cursor = $collection->find();
I tried $cursor->timeout(-1) but without effect.
Sokil
@sokil
add and issue and a'll add this in next release
rupesh1910
@rupesh1910
can anyone help me sort my problem
i want to update my collection 2 i.e fetch value from collection 1
i tried $collection1 = $collection1->find(), $collection2->update($collection1)
Sokil
@sokil
can you explain your question?
Ricard-sans-eau
@RicardoMaGo
Hello, someone here?
Sokil
@sokil
yes)
Ghost
@ghost~5bfff5bcd73408ce4fb0743d
Hi.
Dmitriy, could you please provide an example of document class?
Sokil
@sokil

Your question is vary abstract and complex).

You don't need document class at all:

$client->getDatabase('databaseName')->getCollection('collectionName')->getDocument('someId')->get('some.field');

You need class for you document if you need some validation, default values, complex getters and setters, etc...

Simple document:

<?php 
namespace Vendor\Document; 
use \Sokil\Mongo\Document; 
class SomeDocument extends Document { }

Then read manual or ask more concrete question...

Ghost
@ghost~5bfff5bcd73408ce4fb0743d
Thanks for your answer.