# |
Sep 16th 2019, 08:07 |
peppejaripappalardo |
`$deliveries = $this->find()` ` ->contain(['Actors' => ['Deliveries' => ['MobilePhones']]])` ` ->where(['Users.loggable_object_id' => $loggable_object_id])` ` ->first()->actor->deliveries;` |
# |
Sep 16th 2019, 08:07 |
peppejaripappalardo |
i am doing something like this |
# |
Sep 16th 2019, 08:07 |
peppejaripappalardo |
thx for your reply |
# |
Sep 16th 2019, 08:00 |
guillaumep |
Not sure if I get your table relations right but you should try this : ```<?php $deliveries = $this->find()->contain(['Actors', 'Deliveries.Emails'])->where(['Users.loggable_object_id' => $loggable_object_id])->first(); debug($deliveries); ?>``` |
# |
Sep 16th 2019, 07:44 |
COOurb |
ok, found out that it's impossible |
# |
Sep 16th 2019, 07:40 |
COOurb |
I have belongsTo relation and want to make it also allow NULL |
# |
Sep 16th 2019, 07:39 |
COOurb |
Hello |
# |
Sep 16th 2019, 07:37 |
peppejaripappalardo |
someone can help me? i have this ORM Query: `$deliveries = $this->find()->contain(['Actors' => ['Deliveries' => ['Emails']]])->where(['Users.loggable_object_id' => $loggable_object_id])->first()->actor->deliveries;` I need to get Deliveries and Emails withDeleted record, but when i put the find(‘all’, [‘withDeleted’] i am able to get only deliveries or emails, but not both, some hint? |
# |
Sep 16th 2019, 07:35 |
peppejaripappalardo |
Good morning Guys |
# |
Sep 16th 2019, 07:26 |
jotpe |
Morning! |
# |
Sep 16th 2019, 07:19 |
challgren |
Night night all! |
# |
Sep 16th 2019, 07:15 |
alexdd55976 |
youu too |
# |
Sep 16th 2019, 07:15 |
alexdd55976 |
thank you coni |
# |
Sep 16th 2019, 07:15 |
challgren |
Morning |
# |
Sep 16th 2019, 07:15 |
conehead |
Wish you a pleasent good morning Alex! |
# |
Sep 16th 2019, 07:09 |
alexdd55976 |
morning gents |
# |
Sep 15th 2019, 17:14 |
jeff.black |
@ra7bi Have you checked the plugin doc? https://github.com/cakephp/elastic-search |
# |
Sep 15th 2019, 16:54 |
ra7bi |
@ndm do the elastic-search plugin will automatically create index ? or i must do that , |
# |
Sep 15th 2019, 15:48 |
valerij.bancer |
nice catch. Thank you |
# |
Sep 15th 2019, 15:42 |
ndm |
Not sure, I think they should be compatible, but who knows. However you don't seem to be using the PHPUnit installation that composer pulls in, but a different one from a phar package. Try `vendor/bin/phpunit` instead of just `phpunit`. |
# |
Sep 15th 2019, 15:34 |
valerij.bancer |
https://travis-ci.org/cakemanager/cakephp-utils/jobs/585228903 cakephp 3.8.4, phpunit 5.7.27 - are they not compatible? |
# |
Sep 15th 2019, 15:32 |
ndm |
Some kind of incompatible PHPUnit version / test suite compatibility workarounds... |
# |
Sep 15th 2019, 15:30 |
valerij.bancer |
Any idea of `PHP Warning: Cannot redeclare class PHPUnit\Framework\Test in /home/travis/build/cakemanager/cakephp-utils/vendor/cakephp/cakephp/tests/phpunit_aliases.php on line 9` error? |
# |
Sep 15th 2019, 15:29 |
valerij.bancer |
Hi, is there anybody here today? |
# |
Sep 15th 2019, 15:22 |
ra7bi |
Sure thanks |
# |
Sep 15th 2019, 15:22 |
ndm |
Check your Application class / bootstrap. |
# |
Sep 15th 2019, 15:21 |
ndm |
That error indicates that the `Elastic` factory locator hasn't been registered, which indicates that the plugin isn't being loaded (correctly). |
# |
Sep 15th 2019, 15:14 |
ra7bi |
``` $this->loadmodel('Example', 'Elastic'); ``` will throw error ```Unknowen repository type Elastic make sure you register a type before trying to use it . ``` |
# |
Sep 15th 2019, 15:13 |
ra7bi |
@ndm i meant , i've two datasource 1- Mysql which is default , 2- ElasticSearch i want whenever i insert data into mysql it should go also to elastic this is what i want to end up with , but the error seems related to elastic server configuration im just double checking |
# |
Sep 15th 2019, 15:10 |
ndm |
I don't know what exactly you mean by "_inserting at the same time_", but this is both isn't directly related to the error that you're receiving. AFAIU there doesn't _need_ to be anything more in those classes, ie that's the minimum configuration. |
# |
Sep 15th 2019, 15:03 |
ra7bi |
@ndm i need to understand for example what should be on this class ``` class ArticlesType extends Type ``` also ```class Article extends Document``` my endpoint is to insert into mysql and elasticSearch at same time |
# |
Sep 15th 2019, 14:58 |
ndm |
@ra7bi What kind of example are you looking for? I'm not familiar with the plugin, but being able to use the `Elastic` provider shouldn't require anything other than loading the plugin, which registers the `Elastic` factory at bootstrapping time. |
# |
Sep 15th 2019, 14:34 |
ra7bi |
i do , but they dont have example |
# |
Sep 15th 2019, 14:32 |
jeff.black |
Double check the doc. https://book.cakephp.org/elasticsearch/2.x/en/ |
# |
Sep 15th 2019, 13:57 |
ra7bi |
dont know what should i do |
# |
Sep 15th 2019, 13:57 |
ra7bi |
im getting error ``` Unknowen repository type Elastic make sure you register a type before trying to use it . ``` |
# |
Sep 15th 2019, 13:56 |
ra7bi |
hey , anyone using ElasticSearch plugin ? |
# |
Sep 15th 2019, 06:29 |
COOurb |
because when I call index of it's model I get error and Table 'project.people' doesn't exist |
# |
Sep 15th 2019, 06:28 |
COOurb |
hey, cakephp, is word "Organizations" is key-word? |
# |
Sep 15th 2019, 06:28 |
COOurb |
haha, very funny. |
# |
Sep 14th 2019, 21:01 |
brandon |
Figured it out. The path to migrations is 'config/migrations' on Windows but on *nix, it is 'config/Migrations' which doesn't exist |