Log message #4179088

# At Username Text
# Mar 11th 2019, 10:16 alexdd55 no matter what i change its always “not found”
# Mar 11th 2019, 10:15 challgren I have over 100 fixtures and none of mine have any connection set and Im using the default app.php settings
# Mar 11th 2019, 10:15 alexdd55 its fine
# Mar 11th 2019, 10:14 alexdd55 i will double check
# Mar 11th 2019, 10:14 challgren Then something could be wrong like username/password or db doesnt exist
# Mar 11th 2019, 10:14 alexdd55 even if it would use “default” .. somehow its not finding it
# Mar 11th 2019, 10:13 alexdd55 don’t wanna use default
# Mar 11th 2019, 10:13 alexdd55 because it always says “default” was not found..
# Mar 11th 2019, 10:13 challgren Why are you adding the connection to the fixture?
# Mar 11th 2019, 10:12 alexdd55 its already there
# Mar 11th 2019, 10:12 challgren In your config/app.php look for Datasources and then test
# Mar 11th 2019, 10:08 alexdd55 any ideas how to dix this?
# Mar 11th 2019, 10:07 alexdd55 but still get ```App\Test\TestCase\Model\Table\CompaniesTableTest::testInitialize Cake\Datasource\Exception\MissingDatasourceConfigException: The datasource configuration "default" was not found. ```
# Mar 11th 2019, 10:07 alexdd55 i add this to the fixture `public $connection = 'test';`
# Mar 11th 2019, 10:05 alexdd55 but i got stuck with the db connection
# Mar 11th 2019, 10:05 alexdd55 i am trying to create my first unit tests… EVER :)
# Mar 11th 2019, 10:05 alexdd55 hi
# Mar 11th 2019, 09:31 dereuromark @welo.lamacchia did you figure out your afterSave dirty issue?
# Mar 11th 2019, 09:17 neon1024 Thanks @dereuromark :thumbsup:
# Mar 11th 2019, 09:17 neon1024 Hoped too much for `array_diff()` ;)
# Mar 11th 2019, 09:17 neon1024 Cool, I’ll start trying a recursive approach then, with detecting keys and if value is array
# Mar 11th 2019, 09:17 neon1024 Yeah, I’m taking a TDD approach
# Mar 11th 2019, 09:15 dereuromark Better manually dive into the nested array and diff more custom then. Sure not trivial to do. But with some test cases along the way you should reach a usable state here.
# Mar 11th 2019, 09:09 neon1024 Playing with `array_diff_assoc()` gives an ‘Array to string conversion’ warning, as the entity, when cast to array, obviously has nested array dimensions
# Mar 11th 2019, 09:08 neon1024 I’ve found this necessary because saving the entity will only update new records, the parent has dependant, so delete is fine, but updating existing data will not remove ‘missing’ association data
# Mar 11th 2019, 09:08 neon1024 My use-case is that I’m trying to consume remote data and reflect it in my local data store. However my current code does not cope with local association data which exists, but is not in the remote, and I need to delete that local data if it’s not in the remote. So I’m writing a comparison function to find the differences so I can process that return to update my local data store.
# Mar 11th 2019, 09:07 neon1024 Anyone know how the internals of patchEntity works to mark entity properties as dirty? I’m trying to achieve something similar using `array_diff_assoc()` but it seems to not like entities with associated data
# Mar 11th 2019, 08:53 ntrhieu1905 How to fix confirm form resubmission??? Can help me?
# Mar 11th 2019, 06:45 marwan.salim Hi team. May I know do CakePHP support `MySQL View` , if not how to handle this in migrations ?
# Mar 10th 2019, 17:37 marek.sebera related issue about oscilating exception output is fresh here https://github.com/cakephp/cakephp/issues/13040
# Mar 10th 2019, 17:37 marek.sebera Hi folks, is setting 'debug' to false in ExceptionRenderer, the correct way to hide sensitive debug layout/output, without disabling debug application-wide ?
# Mar 10th 2019, 14:26 grossolive4 How to update entity in afterSave, thanks !
# Mar 10th 2019, 14:26 grossolive4 Hello to all.
# Mar 10th 2019, 14:25 slackebot1 <grossolive4>
# Mar 9th 2019, 20:43 jslamka5685 To fix, on each entity within a collection run $_collection_entity->setVirtual([]);
# Mar 9th 2019, 20:16 jslamka5685 Is there a method for including virtualFields only when you want them?
# Mar 9th 2019, 12:35 graziel what about using https://book.cakephp.org/3.0/en/core-libraries/hash.html#Cake\Utility\Hash::diff
# Mar 9th 2019, 12:34 neon1024 Or could I just cast to array and use array_intersect or something like that? How would that work for multi dimensional entity arrays with nested data?
# Mar 9th 2019, 12:33 neon1024 Has anyone built something which compares entities and shows the differences?
# Mar 9th 2019, 12:14 neon1024 Morning
# Mar 9th 2019, 11:43 chunu anyone here to help?