Log message #4124778

# At Username Text
# Mar 13th 2018, 22:18 dereuromark thats not the namespace
# Mar 13th 2018, 22:18 xinobi namespace App\Auth\CustomAuthenticate;
# Mar 13th 2018, 22:17 dereuromark whats your namespace of it?
# Mar 13th 2018, 22:17 xinobi it should be auto loaded...
# Mar 13th 2018, 22:17 xinobi I've and it didn't worked Authentication adapter "Custom" was not found.
# Mar 13th 2018, 22:16 dereuromark try it
# Mar 13th 2018, 22:14 xinobi dereuromark so I need a folder named Auth and class NameAuthenticate with proper namespace adjustment ?
# Mar 13th 2018, 22:09 dereuromark same structure etc, even if on app level
# Mar 13th 2018, 22:08 dereuromark same as all the other plugins etc :slightly_smiling_face: see awesome list
# Mar 13th 2018, 22:06 xinobi where should I place to place a custom authentication adapter?
# Mar 13th 2018, 20:07 cnizzardini @madrid998 this isn't a cake thing, this is a general software engineering question you are asking. A simple static file with a 1 or 0, a database table with a is_first_time boolean column or an install page would all solve your problem a long with countless other ways.
# Mar 13th 2018, 20:04 cnizzardini @jojomartius maybe leftJoinWith https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html
# Mar 13th 2018, 20:03 cnizzardini @jojomartius CakePHP can do most everything you want. You can force contains to a LEFT JOIN if you'd like. You can even do custom joins. I need to know your schema and query before I could begin to help. See if you can get the ORM to do what you want.
# Mar 13th 2018, 19:59 madrid988 I need to populate the database table the first time the app is used.
# Mar 13th 2018, 19:58 madrid988 The records are static rows which are currently hard-coded in an array.
# Mar 13th 2018, 19:58 madrid988 My app requires a database table named 'custom_report_column_names' to be populated with records when the app is first used. How do I handle this in CakePHP?
# Mar 13th 2018, 19:23 jojomartius @cnizzardini but i can't make a condition in my comments to return everything what has no comment :P because cake handles it not as LEFT JOIN but as two seperate queries
# Mar 13th 2018, 19:10 inoas grml.. cordova, typescript, ionic, angular, java, objective c, ... so much "stuff" :(
# Mar 13th 2018, 19:09 inoas hmm :( too much magic for me - I think
# Mar 13th 2018, 19:08 inoas steinkel let me take a look instead of reinventing the wheel all time ;)
# Mar 13th 2018, 18:56 madrid988 Also for testing, we would need to populate the test database with the records before running the test, so it would be simpler to have a hard coded static array. There are no associations.
# Mar 13th 2018, 18:54 madrid988 The data starts off as a hard coded array so it is simpler to use that same static array instead of creating a database table and populating the database. We will simply store the records as an array in the model and set useTable=false
# Mar 13th 2018, 18:46 dereuromark why do you want to? just cache and you are done. Even that is not necessary, the overhead of change outweighs any benefit
# Mar 13th 2018, 18:44 steinkel we use cakedc/cakephp-api like every day :slightly_smiling_face:
# Mar 13th 2018, 17:29 madrid988 I have a table used to store about 50 records which never change, the data is static. What is the best way to store this as an array in Cake instead of a database? Where do I store the file? Many thanks for any help.
# Mar 13th 2018, 17:17 jojomartius looks good ;) i'm trying to do it... thanks
# Mar 13th 2018, 17:15 cnizzardini @jojomartius https://book.cakephp.org/3.0/en/orm/query-builder.html#passing-conditions-to-contain
# Mar 13th 2018, 17:15 cnizzardini You can do conditions on the contains
# Mar 13th 2018, 17:13 jojomartius hey guys.. trying to play a bit with cake3's models and querys... i found in the docu a simple has many example $query = $articles->find('all')->contain(['Comments']);.. whats the best way to find only articles where the comment is cmming from a specifc user or all articels the user hasnt commented yet ;)
# Mar 13th 2018, 17:12 dereuromark istvan: not a long term thing probably, not too performant
# Mar 13th 2018, 17:12 cnizzardini Looks like I use removeBehavior() now?
# Mar 13th 2018, 17:12 bakro.istvan What about views? A view which aggregates the multiple table accounts; used only for authentication
# Mar 13th 2018, 17:11 dereuromark not sure why though
# Mar 13th 2018, 17:11 dereuromark even earlier maybe, the behavior has to exist to be unloaded() afaik
# Mar 13th 2018, 17:10 cnizzardini Were there any changes from 3.4 to 3.5 with loading/unloading behaviors dynamically? I am getting "Behavior class TimestampBehavior could not be found. in [vendor/cakephp/cakephp/src/ORM/BehaviorRegistry.php, line 127]" when calling $ModelName->behaviors()->unload('Timestamp');
# Mar 13th 2018, 17:09 neon1024 @willem Then you must refactor from `belongsToMany` to `hasMany` imho
# Mar 13th 2018, 17:08 neon1024 Oh, just one thought before I vanish. Do check DebugKit, to ensure that in the SQL tab it doesn’t say ‘An instance was created using Cake\ORM\Table’ because if it does, then you’ve probably got a typo
# Mar 13th 2018, 17:08 willem ``` $this->belongsTo('FieldsOfStudies', [ 'foreignKey' => 'fields_of_study_id', 'joinType' => 'INNER' ]); ``` is extra in the applicantsDegreesTable, which you do not have
# Mar 13th 2018, 17:07 willem yes that is how it is set up and it is workgin, but in the join table i have more keys to link to other tables. and i would also like to see the actual content from that table and not only the ID (which i get now)
# Mar 13th 2018, 17:06 neon1024 Anyway, good luck. That’s the end of my day :slightly_smiling_face:
# Mar 13th 2018, 17:06 neon1024 Perhaps it’s as simple as clearing your orm cache!?