Log message #3941309

# At Username Text
# Oct 2nd 2016, 01:39 moose517 how are you
# Oct 2nd 2016, 01:39 waspinator hi moose
# Oct 2nd 2016, 01:39 waspinator hmm, just returning `$q` worked
# Oct 2nd 2016, 01:39 moose517 hi guys
# Oct 2nd 2016, 01:37 waspinator `$q->isEmpty()` would probably have something to do with it
# Oct 2nd 2016, 01:34 waspinator hmm okay, so `$model->matching('Association' function($q) {return $q->?} )` what condition would I set to mean `not empty`?
# Oct 2nd 2016, 01:25 ndm http://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#filtering-by-associated-data
# Oct 2nd 2016, 01:25 ndm @waspinator Depends on the type of association... for `hasOne`/`belongsTo` you could use the `INNER` join type (contain configs accept a `joinType` option), apart from that, `innerJoinWith()`/`matching()` works for all types.
# Oct 2nd 2016, 01:17 waspinator how would you `find()` records where the `contain`ed association is not null?
# Oct 1st 2016, 23:27 CoderJon Does anyone know how to get bootstrap to work with CakePdf?
# Oct 1st 2016, 17:14 mesterjagel @hmic okay. I just didnâ??t get an error before I tried to save the individual entity that was failing. Iâ??m most likely doing it wrong in that case :slightly_smiling_face: Thank you :slightly_smiling_face:
# Oct 1st 2016, 17:12 hmic the error will not be in the main entity, but the related one of which the save failed
# Oct 1st 2016, 17:11 hmic mesterjagel: from the entity, like without
# Oct 1st 2016, 16:58 mesterjagel Hey guys, when is there a way to get error messages when saving a with associations and something in the associated data fails?
# Oct 1st 2016, 16:38 ra7bi :+1:
# Oct 1st 2016, 16:37 hmic both are free for use and download to process in a format you like
# Oct 1st 2016, 16:37 ra7bi Thanks @hmic
# Oct 1st 2016, 16:37 hmic this too: http://cldr.unicode.org/translation/country-names
# Oct 1st 2016, 16:36 hmic this is a quite official list with countries and their english names: http://data.okfn.org/data/core/country-list
# Oct 1st 2016, 16:36 ra7bi Okay , i thought there is an automatic way
# Oct 1st 2016, 16:35 hmic ra7bi: you need a list of countrie, maybe even translations?! it's quite static data, still a lot. you could keep them in a db table or have a file with them to load in
# Oct 1st 2016, 16:33 ra7bi what is the best way to create nationality dropdown list , is there a plugin ? instate of writing all countries manually
# Oct 1st 2016, 16:32 ra7bi hello
# Oct 1st 2016, 16:17 rsadza I didn't know about widgets yet, this is great :slightly_smiling_face:
# Oct 1st 2016, 16:16 hmic additionally, you have a fully working example on it in the core: the datetime datatype and widget
# Oct 1st 2016, 16:15 hmic it makes it easier to marshall the data and utilizing a widget
# Oct 1st 2016, 16:14 hmic welcome!#
# Oct 1st 2016, 16:14 rsadza cool!
# Oct 1st 2016, 16:14 rsadza Thanks :slightly_smiling_face: I didn't even consider submitting the entire field as an array (I was thinking about having [price] and [price_unit])
# Oct 1st 2016, 16:13 hmic if you provide a custom widget, you might get away with that alone, as the formhelper would know the field type (money) and choose a coresponging widget automatically itself!
# Oct 1st 2016, 16:13 hmic extending the form helper to output a currency field type is a good idea to ease the usage, sure
# Oct 1st 2016, 16:12 hmic still, you only have one place to deal with that: when marshalling data to the entity.
# Oct 1st 2016, 16:11 hmic thats it rsadza
# Oct 1st 2016, 16:11 hmic you would send at least the following data: ['value' => 500, 'currency' => 'EUR', 'unit' => 1 /* 0.01 or 'ct', 'EUR' */]
# Oct 1st 2016, 16:11 rsadza it currently is, so I am considering adding an input type to the formhelper that adds a hidden field that contains the type (cents / euros)
# Oct 1st 2016, 16:10 aro anyone seen this? Uncaught Error: Class 'Cake\Error\PHP7ErrorException' not found
# Oct 1st 2016, 16:10 hmic and your input will not consist of a single field only, will it?
# Oct 1st 2016, 16:09 hmic you dont change the marshaller
# Oct 1st 2016, 16:09 rsadza true, the only thing I'm afraid of is that somebody will change an input from cents to euros or vice-versa, and forget to change the marshaller ;)
# Oct 1st 2016, 16:08 rsadza the Money class keeps the information (Money::EUR(500) = 5.00 euro), but you still need to know if you should multiply by 100
# Oct 1st 2016, 16:07 hmic if it's not. you know when to apply it: when marshalling data to the entity. you have a marshaller for the money class anyways, put the code there so it's all in one place and not duplicated whatsoever