# |
Sep 16th 2019, 09:11 |
spriz |
:( |
# |
Sep 16th 2019, 09:11 |
neon1024 |
Hard to do concrete implementation for a list in the datastore |
# |
Sep 16th 2019, 09:10 |
spriz |
:) |
# |
Sep 16th 2019, 09:10 |
spriz |
Nasty |
# |
Sep 16th 2019, 09:10 |
spriz |
Oh |
# |
Sep 16th 2019, 09:10 |
neon1024 |
The methods you mean? I use `__call()` |
# |
Sep 16th 2019, 09:10 |
spriz |
that method name should be `public function findAwatingAudit($query, $options): Query {}` ? |
# |
Sep 16th 2019, 09:10 |
neon1024 |
Perhaps I’ll change the method label string in the behaviour |
# |
Sep 16th 2019, 09:10 |
spriz |
but - but |
# |
Sep 16th 2019, 09:09 |
neon1024 |
I added `$this->find('awaitingAudit')` and got a Missing finder method, and got :S |
# |
Sep 16th 2019, 09:09 |
neon1024 |
It automatically adds finder for me based on my Statuses table |
# |
Sep 16th 2019, 09:09 |
neon1024 |
I add it using a behaviour |
# |
Sep 16th 2019, 09:08 |
spriz |
the custom finder that is |
# |
Sep 16th 2019, 09:08 |
spriz |
@neon1024 how is that method named? |
# |
Sep 16th 2019, 09:08 |
spriz |
@COOurb that should be possible :slightly_smiling_face: |
# |
Sep 16th 2019, 09:07 |
javier.villanueva |
morning all |
# |
Sep 16th 2019, 09:07 |
neon1024 |
My code just generated, a finder called ‘Awaiting audit’, and it works as `$this->find('Awaiting audit')` :thinking_face: |
# |
Sep 16th 2019, 09:07 |
spriz |
@peppejaripappalardo you can do this: https://github.com/UseMuffin/Trash/blob/master/src/Model/Behavior/TrashBehavior.php#L211-L217 |
# |
Sep 16th 2019, 09:07 |
neon1024 |
Not sure if it’s important, but custom finder accept spaces |
# |
Sep 16th 2019, 09:06 |
jotpe |
thanks @spriz |
# |
Sep 16th 2019, 09:03 |
spriz |
right now we have `if ($entity->rule === ''`) { $entity->rule = null; }` in `beforeSave` - feelsbadman |
# |
Sep 16th 2019, 09:02 |
spriz |
How does the ORM decide whether it should put `null` or `''` for a input that is type `string`? :thinking_face: |
# |
Sep 16th 2019, 09:02 |
spriz |
@jotpe `Security::randomString()` :slightly_smiling_face: |
# |
Sep 16th 2019, 09:01 |
jotpe |
for e.g. Passwords? |
# |
Sep 16th 2019, 09:01 |
jotpe |
Is there a method in a Utility to create random Strings? |
# |
Sep 16th 2019, 08:09 |
peppejaripappalardo |
Emails are son of Deliveries, but i need to get Emails withDeleted record, and i am not able to perform both, deliveries and emails :S |
# |
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! |