# |
Feb 1st 2018, 08:55 |
hippo |
I have a `$this->belongsTo('Countries');` already.. Let me try remove the function to see if it makes a difference. |
# |
Feb 1st 2018, 08:47 |
ooskar1233 |
@hippo something like ```php public function initialize(array $config) { $this->belongsTo('Country'); } ``` |
# |
Feb 1st 2018, 08:45 |
ooskar1233 |
@hippo you can safely remove all the `add` method, but you should add relationship in your `AddressTable` |
# |
Feb 1st 2018, 08:38 |
hmic |
in this particular case i'm opting to orWhere() with 2 and 3 as the arguments now, as it's a QnD hack. but i'm rather desperate on the correct solution :/ |
# |
Feb 1st 2018, 08:38 |
hmic |
options?! |
# |
Feb 1st 2018, 08:38 |
hmic |
but it does not match the "type" alias of the field either, even ->where(['SUBSTRING(Companies.type, 3, 1) IN' => [2, 3]], ['SUBSTRING(Companies.type, 3, 1) IN' => 'array']) does not match the field |
# |
Feb 1st 2018, 08:37 |
hmic |
so i tried to hint it like: ->where(['SUBSTRING(Companies.type, 3, 1) as type IN' => [2, 3]], ['type' => 'array']) |
# |
Feb 1st 2018, 08:37 |
hmic |
cake does guess the type of my arguments wrong (the IN array part) |
# |
Feb 1st 2018, 08:36 |
hmic |
in this ->where(['SUBSTRING(Companies.type, 3, 1) as type IN' => [2, 3]]) |
# |
Feb 1st 2018, 08:36 |
hmic |
admad: getting more serious questions now :O |
# |
Feb 1st 2018, 08:34 |
hippo |
Could you maybe have a quick look at the snippet and see if anything wrong jumps out when you get a minute :) |
# |
Feb 1st 2018, 08:32 |
admad |
hmic: that seems to be the answer :slightly_smiling_face: |
# |
Feb 1st 2018, 08:32 |
hippo |
@ooskar1233 Yeah, I'm not sure why it's not saving my relationship |
# |
Feb 1st 2018, 08:21 |
hmic |
$this->setConnection(\Cake\Datasource\ConnectionManager::get('datasource-name'); |
# |
Feb 1st 2018, 08:16 |
hmic |
stupid question: how to make a table use a different datasource? - cake3 |
# |
Feb 1st 2018, 07:33 |
ooskar1233 |
@hippo I am using it, if you still have some trouble let me know |
# |
Feb 1st 2018, 04:16 |
hippo |
File uploaded https://cakesf.slack.com/files/U0U45PUA1/F91F7JHUZ/-.txt / https://slack-files.com/T053DPNCM-F91F7JHUZ-f7809c5309 - Anyone here used the CRUD JSON API yet? Struggling to create an entry with a relationship. |
# |
Feb 1st 2018, 03:28 |
spencdev |
Is it returning a bool or int? |
# |
Feb 1st 2018, 02:46 |
gsitex |
This is a default method ``` public function main() { $this->out($this->OptionParser->help()); } ``` |
# |
Feb 1st 2018, 02:46 |
gsitex |
File uploaded https://cakesf.slack.com/files/U1VHNK3G8/F920PSB1S/error5.jpg / https://slack-files.com/T053DPNCM-F920PSB1S-1909c07411 |
# |
Feb 1st 2018, 02:45 |
gsitex |
I got a strange behavior in my custom Shell classes with main() method. My IDE is not liking it :( |
# |
Feb 1st 2018, 02:43 |
gsitex |
Hey people! |
# |
Feb 1st 2018, 01:17 |
dereuromark |
@ank068 check your app.php config and if all session configs are there, sounds like there might be sth missing |
# |
Jan 31st 2018, 23:43 |
meder |
oh god, n/m |
# |
Jan 31st 2018, 23:35 |
meder |
i'm calling $this->paginate with a controller and that's when it gets thrown |
# |
Jan 31st 2018, 23:34 |
meder |
how can I easily catch/test for "Impossible to generate condition with empty list of values for field " before the exception gets thrown? |
# |
Jan 31st 2018, 22:07 |
cnizzardini |
but i am interested in what others might say, have you tried googling for this? |
# |
Jan 31st 2018, 22:07 |
cnizzardini |
In my projects I just run stuff out of webroot |
# |
Jan 31st 2018, 22:04 |
alaovich |
Hi! I would like use webpack on my cakephp 3 project but i don't know what is a best method |
# |
Jan 31st 2018, 22:01 |
popperz0r |
not the url `/users/users/social-email` gives me a 404 :) |
# |
Jan 31st 2018, 22:01 |
popperz0r |
Having real troubles with this one |
# |
Jan 31st 2018, 22:01 |
popperz0r |
Hi, anyone uses cakedc plugin and has worked with socialEmail validation? |
# |
Jan 31st 2018, 21:43 |
ank068 |
Any help or suggestion will help |
# |
Jan 31st 2018, 21:43 |
ank068 |
File uploaded https://cakesf.slack.com/files/U91GR08DV/F920ZG5NZ/screen.png / https://slack-files.com/T053DPNCM-F920ZG5NZ-254ec18d71 - This is the error |
# |
Jan 31st 2018, 21:43 |
ank068 |
File uploaded https://cakesf.slack.com/files/U91GR08DV/F920ZB84D/-.txt / https://slack-files.com/T053DPNCM-F920ZB84D-b018e01e92 - I am currently migrating my project from cake 1.3 to cake 3.5.10 and I getting an error for the sessions. |
# |
Jan 31st 2018, 21:13 |
zmurphy |
Can different authenticate methods be assigned different session keys? |
# |
Jan 31st 2018, 21:04 |
bato |
hi, is there a way to do `SELECT ROUND( SUM( field ) / 8, 1 ) as alias` using the ORM? I don't understand how to divide by 8 |
# |
Jan 31st 2018, 20:41 |
zmurphy |
So I'm adding a new rule class to ensure an administrator doesn't exist as a user and a user doesn't exist as an administrator, and somehow it's breaking all my tests by somehow causing user entities to become administrator entities and vice versa and I have no idea how. I don't modify the entityinterface passed to the rule in any way so I've no clue how that happens |
# |
Jan 31st 2018, 20:08 |
meder |
thank you |
# |
Jan 31st 2018, 20:07 |
meder |
perfect |
# |
Jan 31st 2018, 20:07 |
meder |
oh |