Log message #4189511

# At Username Text
# Jun 14th 2019, 07:11 val That is correct.
# Jun 14th 2019, 07:09 admad an entity is more complex than a plain php object with properties
# Jun 14th 2019, 07:07 val This is a common misconception. Objects do not take more memory than arrays. Please take a look at https://gist.github.com/nikic/5015323. I personally tested it. A plain PHP object with 6 predefined fields occupies 50% less memory then an associative array with 6 fields. I may agree with you that it is not optimal to retrieve 153000 entities at a time but sometimes business rules require that and there is no better alternative.
# Jun 14th 2019, 06:57 spriz Any good tricks to contain a `BelongsToMany` with a WHERE clause on some data in the join table? Usually I make it a `HasMany` and add the filter and chain the `HasMany.BelongsTo` - but it is a bit awkward
# Jun 13th 2019, 21:49 unclezoot looks like my hasOne association was wrong, obviously thought bake could read my mind, but instead put in hasMany (sigh)
# Jun 13th 2019, 21:25 noel I'm working within a helper, so I guess ideally via static methods.
# Jun 13th 2019, 21:25 noel Is there anyway I can query the db schema programmatically?
# Jun 13th 2019, 21:23 noel It's a bit weird because it's returning true for an alias to a table name that is being setup in an association. So what I'm really looking for is a way of checking whether a given string corresponds to an actual table, as distinct from a string which corresponds to an alias of a table setup by an association. `TableRegistry::getTableLocator()->exists` seems to return true for both of those cases.
# Jun 13th 2019, 21:21 ricksaccous so maybe that won't work
# Jun 13th 2019, 21:21 ricksaccous but have 0 records
# Jun 13th 2019, 21:21 ricksaccous or i suppose it could exist
# Jun 13th 2019, 21:21 ricksaccous and if it returns null it doesn't exist
# Jun 13th 2019, 21:21 ricksaccous just do a find first on the table
# Jun 13th 2019, 21:19 noel I'm struggling a bit with TableRegistry. I'm doing `$exists = TableRegistry::getTableLocator()->exists(Inflector::camelize('some_table_that_does_not_exist'));` and it's returning true.
# Jun 13th 2019, 21:17 unclezoot hi, ive decided to try and do a saveAll using a HasOne association for the first time ever 1) what does the newEntity() call look like in the primary controller, to prep a blank linked hasOne entity, 2) should the form inputs look like $this->form->control('myHasOne.name') (singular) ? in the patchEntity ive added 'associated' => ['myHasOnes'] but doesnt seem to be doing much. thanks in advance for any insights!
# Jun 13th 2019, 19:35 ricksaccous oh well
# Jun 13th 2019, 19:35 ricksaccous wth lol
# Jun 13th 2019, 19:34 ricksaccous but not https
# Jun 13th 2019, 19:34 ricksaccous it only happens on http requests
# Jun 13th 2019, 19:34 ricksaccous oh weird
# Jun 13th 2019, 19:30 ricksaccous on the next action
# Jun 13th 2019, 19:30 ricksaccous i get authentication required exception
# Jun 13th 2019, 19:30 ricksaccous where in authentication after i redirect after hitting $result->isValid()
# Jun 13th 2019, 19:30 ricksaccous I'm running into a strange problem
# Jun 13th 2019, 17:57 awi how do you access errors in a belongsToMany, when you validate in the n:m Table with buildRules and defined it is associated "through"... I dont get any errors in the validated data, but it doesnt save either
# Jun 13th 2019, 15:45 ricksaccous it's in the docs
# Jun 13th 2019, 15:45 ricksaccous i mean you can bake it for each table individually for sure
# Jun 13th 2019, 15:44 ricksaccous read the manual because that's all i would do to check
# Jun 13th 2019, 15:44 ricksaccous you can bake it but i don't know if you can bake it for every table
# Jun 13th 2019, 15:41 noel How to generate seed data? Can one bake it or is it manual?
# Jun 13th 2019, 15:40 ricksaccous who knows
# Jun 13th 2019, 15:40 ricksaccous I think that folder might be used by cake internal plugins or something
# Jun 13th 2019, 15:39 ricksaccous but yeah seeds is actual data and migrations are for schema changes
# Jun 13th 2019, 15:39 ricksaccous i actually have no idea what that folder is for
# Jun 13th 2019, 15:38 noel Ok so seeds is actual data whereas migrations is schema changes.... so then what's the `config/schema` folder for?
# Jun 13th 2019, 15:38 noel Haha :slightly_smiling_face: I did actually delete the sphinxlog table initially. So not sure why it came back with entries when the rest didn't.
# Jun 13th 2019, 15:38 ricksaccous if you want all your initial data
# Jun 13th 2019, 15:38 ricksaccous also yeah you'll want to seed all your data as well
# Jun 13th 2019, 15:37 ricksaccous APPARENTLY YOU LIED
# Jun 13th 2019, 15:37 ricksaccous I assumed you were deleting that table though
# Jun 13th 2019, 15:37 ricksaccous so basically it knows what you have run/haven't run based on that phinxlog table