Log message #4019084

# At Username Text
# Apr 21st 2017, 13:20 juniorionut :))
# Apr 21st 2017, 13:20 Neon1024 dereuromark, I don’t think it works myself, will try on 3v4l.org
# Apr 21st 2017, 13:20 nemmons ah, my app is probably doing something weird that I've forgotten about then :-)
# Apr 21st 2017, 13:20 Neon1024 dereuromark, I’d usually use php -a but I don’[t have the framework setup on CLI
# Apr 21st 2017, 13:19 juniorionut @nemmons , i do not load User model in order to specify to Auth
# Apr 21st 2017, 13:19 juniorionut Loading early means that that they are available early :))
# Apr 21st 2017, 13:19 nemmons I had the problem on my Users model, which, I'm not sure how you could get away with NOT loading that early, since the Auth Component needs it
# Apr 21st 2017, 13:18 admad good lesson learned to not load models too early :slightly_smiling_face:
# Apr 21st 2017, 13:18 juniorionut only 2-3 days lost :slightly_smiling_face:
# Apr 21st 2017, 13:17 juniorionut @admad ok!
# Apr 21st 2017, 13:17 juniorionut @nemmons , no problem , i did not knew either , saw now as i began to remove code :))
# Apr 21st 2017, 13:17 dereuromark Neon: you should know better - to quickly test it :slightly_smiling_face: then you would know that instance of also works with childs.
# Apr 21st 2017, 13:17 technofection I am feeling helpless :( Please help me saving hasMany models
# Apr 21st 2017, 13:17 juniorionut @nemmons , for me yes, that was the issue
# Apr 21st 2017, 13:17 nemmons Yeah i had that same problem like a year ago. I wish i had known you were loading models in the component, i would have told you that was an issue =(
# Apr 21st 2017, 13:16 admad make a PR to add note in readme
# Apr 21st 2017, 13:16 Neon1024 If Chronos extends DateTime, would $chronos instance of DateTime be true? I think it’d be false right? Despite it being a child class
# Apr 21st 2017, 13:16 nemmons Oh, man, that was the problem?
# Apr 21st 2017, 13:16 juniorionut @admad , makes sense, i consider that this should be specified in the readme as others will lose interest quickly. I have spent alot of time untill i reached this point...
# Apr 21st 2017, 13:15 admad @juniorionut if any model get's loaded through controller's initialize() it won't get the footprint listener get attached to it.
# Apr 21st 2017, 13:13 joop i have found my issue there is a field called parent_id it refer back to the same model
# Apr 21st 2017, 13:13 juniorionut beats me why...
# Apr 21st 2017, 13:13 juniorionut And it seems that ``` $this->belongsToMany('AuthAcl.Groups', [ 'propertyName' => 'Group', 'foreignKey' => 'user_id', 'targetForeignKey' => 'group_id', 'joinTable' => 'users_groups' ]); ``` also stops the plugin from working inside the "groups" model
# Apr 21st 2017, 13:11 juniorionut So-called issue
# Apr 21st 2017, 13:11 juniorionut I have started to remove all code from controllers to isolate the issue and found the issue in a component
# Apr 21st 2017, 13:10 juniorionut @dereuromark , no everything is in place. As strange as it sounds (to me) i think that i have found the culprit - i loaded some models inside some components in the initialize method. What that has to do with the footprit i don't know, but need to test to be 100% sure
# Apr 21st 2017, 13:09 joop but why this does not work?
# Apr 21st 2017, 13:06 joop but its allways let to save the same values
# Apr 21st 2017, 13:06 joop $rules->add($rules->isUnique(['field1','field2','field3']))
# Apr 21st 2017, 13:06 dereuromark use scope option
# Apr 21st 2017, 13:05 joop i tried to write costum buildRules by
# Apr 21st 2017, 13:05 joop i am just stuck with validation for 3 fields uniques
# Apr 21st 2017, 13:05 joop hello there
# Apr 21st 2017, 13:04 technofection I am still fighting saving hasMany, no success yet :( @dereuromark
# Apr 21st 2017, 13:00 dereuromark juniorionut
# Apr 21st 2017, 12:59 technofection was that for me @dereuromark
# Apr 21st 2017, 12:47 juniorionut Deleting all code from Orders table does not help...
# Apr 21st 2017, 12:39 dereuromark that usually is the number one beginners mistake regarding overwriting of callbacks
# Apr 21st 2017, 12:39 dereuromark did you forget to call parent:: ?
# Apr 21st 2017, 12:39 juniorionut I have figured something else is the meantime - i get the plugin loaded in some modles, while in others i do not - https://pastebin.com/Vgwh8wMi
# Apr 21st 2017, 12:30 technofection I have copied the Entity Before Save and After Save... Can you please have a look?