Log message #4217689

# At Username Text
# Dec 7th 2019, 13:17 damiano before inserting updated records
# Dec 7th 2019, 13:17 damiano basically i have to remove all records that have property_id = 10
# Dec 7th 2019, 13:17 damiano is it possible to delete all record that has a specific field before inserting?
# Dec 7th 2019, 13:16 damiano hello
# Dec 7th 2019, 07:00 admad @neon1024 for your testing pleasure :slightly_smiling_face: https://github.com/UseMuffin/Webservice/tree/cake-4.x
# Dec 7th 2019, 05:11 GigaFlow feature*
# Dec 7th 2019, 05:11 GigaFlow How to use remember_me featre in new Authentication plugin?
# Dec 7th 2019, 03:59 turkles What is the easiest way to do a LEFT OUTER join? ie. I want all entries where a particular association is empty
# Dec 6th 2019, 21:13 challgren https://book.cakephp.org/3/en/orm/associations.html#hasmany-associations
# Dec 6th 2019, 21:12 challgren and bindingKey
# Dec 6th 2019, 21:12 challgren foreignKey parameter for your relationship
# Dec 6th 2019, 21:10 dogmatic69 for example joining by a username if that was a field in both tables
# Dec 6th 2019, 21:10 dogmatic69 Is there a way to define a relation between two tables not using primaryKeys
# Dec 6th 2019, 21:07 dogmatic69 o/
# Dec 6th 2019, 16:53 neon1024 I’ll look at it again on Monday, and perhaps I’ll have a Eureka! moment
# Dec 6th 2019, 16:53 neon1024 Thanks very much for the help though @ndm
# Dec 6th 2019, 16:53 neon1024 Oh well
# Dec 6th 2019, 16:52 ndm `errors()` genereally works fine, it's what the patching mechanism uses too.
# Dec 6th 2019, 16:52 neon1024 I reckon my input is wrong somehow
# Dec 6th 2019, 16:52 neon1024 Especially as `processRules` has the ValidationSet as `$rules`
# Dec 6th 2019, 16:51 neon1024 Knowing Cake though `@mixed $field` ;P
# Dec 6th 2019, 16:51 neon1024 No, I just wonder if my input is incorrect, was more what I was thinking :slightly_smiling_face:
# Dec 6th 2019, 16:50 ndm Well, the naming is a bit off, but that's really not causing any problems :slightly_smiling_face:
# Dec 6th 2019, 16:50 neon1024 As it looks just for allowEmpty which is deprecated
# Dec 6th 2019, 16:50 neon1024 You know what, I don’t think `errors()` works with the `allowEmptyString`
# Dec 6th 2019, 16:47 neon1024 Which would make `$field` a ValidationSet instance, which doesn’t seem right for a variable called $field
# Dec 6th 2019, 16:47 neon1024 Which is odd as in `errors` the foreach is for ` ```foreach ($this->_fields as $name => $field) {```
# Dec 6th 2019, 16:47 neon1024 Using reflection to investigate `_fields` in the Validator, I can see it’s an array of `fieldName => validationSet`
# Dec 6th 2019, 16:43 neon1024 Good point on the validator instance though! Had not thought of that one
# Dec 6th 2019, 16:43 neon1024 Well it’s create by default and that’s what this table class does, so that should be okay :slightly_smiling_face:
# Dec 6th 2019, 16:42 neon1024 Yeah, seems it’s all setup but `errors()` doesn’t actually run like it says that it does :thinking_face:
# Dec 6th 2019, 16:42 ndm It should work... you don't need a custom validator instance though, you can use `getValidator()`, and you need to make sure that pass whether it's an create or update to the `errors()` method.
# Dec 6th 2019, 16:39 neon1024 Shame really, that really felt like something that could be achieved with just a Validator
# Dec 6th 2019, 16:39 neon1024 I guess it doesn’t work and I’ll have to use an integration test
# Dec 6th 2019, 16:37 neon1024 Although I am assuming my validation will throw errors!
# Dec 6th 2019, 16:36 neon1024 When checking `$validator->field('id')` for example, you see the rules in the ValidationSet. Perhaps the docblock is wrong and `errors()` doesn’t actually do what it says
# Dec 6th 2019, 16:35 neon1024 As my assumption is that the app table class just decorates an instance with the rules
# Dec 6th 2019, 16:34 slackebot2 <neon1024>
# Dec 6th 2019, 16:34 neon1024 Yeah, it is a table instance
# Dec 6th 2019, 16:33 neon1024 Maybe, let me check, although it’s a baked test case
# Dec 6th 2019, 16:33 ndm Maybe `$this->ProviderPortalSaleDataTable` isn't what you expect it to be.