Log message #3941735

# At Username Text
# Oct 3rd 2016, 13:33 dereuromark Just blogged again after months, about migration plugin in 2.x apps :slightly_smiling_face: http://www.dereuromark.de/2016/10/03/use-3-x-migrations-for-your-2-x-cakephp-app/
# Oct 3rd 2016, 13:12 maikh hm, sounds logical...
# Oct 3rd 2016, 13:12 hmic if the client decides to send all, replace whats in like you do already
# Oct 3rd 2016, 13:12 hmic thats the thing to do.
# Oct 3rd 2016, 13:12 hmic +1 @dakota
# Oct 3rd 2016, 13:11 dakota likewise, if something has changed, it should only be sending the data that did change
# Oct 3rd 2016, 13:11 dakota My opinion here is that your js/client side code should not be sending a request to the server if data hasnâ??t changed
# Oct 3rd 2016, 13:11 maikh yes, youre right. but i dont have a other idea... im not the high end coder ;)
# Oct 3rd 2016, 13:09 hmic its is not a feasable solution at any scale bigger than your dev box :p
# Oct 3rd 2016, 13:09 hmic *and* you put a lot of stress to your database still if you check for the data every second when your js sends in data - which you will need to admit is completely pointless if nothing changed
# Oct 3rd 2016, 13:09 maikh hmmm... where then?
# Oct 3rd 2016, 13:08 hmic maikh: its not the place to do it
# Oct 3rd 2016, 13:05 maikh @dakota would it possible to check for existing data in the Entity Class?
# Oct 3rd 2016, 13:05 maikh @hmic
# Oct 3rd 2016, 12:52 maikh hm, ok... i will try.
# Oct 3rd 2016, 12:51 hmic maybe you better change the frontend to only send changed data
# Oct 3rd 2016, 12:51 hmic in your case, you would add a unique constrait not so save all data again. but still yoiu put a lot of stres on your database for no good reason
# Oct 3rd 2016, 12:51 hmic so its as i said: its up to you to decide if you want to save or not based on your business data/model
# Oct 3rd 2016, 12:47 maikh but then, the rooms table creates new records on every save.
# Oct 3rd 2016, 12:47 maikh ok...
# Oct 3rd 2016, 12:46 dakota Itâ??s entire job is to delete all the join data
# Oct 3rd 2016, 12:46 dakota Ok. First thing is donâ??t use the replace strategy
# Oct 3rd 2016, 12:45 maikh hm, i try to explain in my bad english... i have a n:m association ```n:forms - m:rooms``` my saving process is runnin all few seconds with a jQuery serialize. and on every save() the data in the rooms table is deleted and new created with new id. Even if the data for the rooms is not changed. i want that the rooms data is only saved if the data is new respectively not in the db at this point.
# Oct 3rd 2016, 12:45 hmic so he just needs to save hasMany (joinTable) instead of belongsToMany (otherTable)
# Oct 3rd 2016, 12:44 dakota I think you might be right :slightly_smiling_face:
# Oct 3rd 2016, 12:43 dakota hmic, itâ??s already a hasMany relation :slightly_smiling_face:
# Oct 3rd 2016, 12:43 hmic i do think that is a common solution to your question
# Oct 3rd 2016, 12:43 hmic so you might be better of dont using belongsToMany but hasMany to the jointable from both sides
# Oct 3rd 2016, 12:42 hmic probably you are saving additional information in the join table
# Oct 3rd 2016, 12:42 dakota maikh What exactly do you need it to do?
# Oct 3rd 2016, 12:42 hmic none. thats the answer. the core does not do it, afaik. so you need to roll your own implementation
# Oct 3rd 2016, 12:41 maikh hm, what infos do you need for maybe able to help?
# Oct 3rd 2016, 12:41 hmic so basically: no. not out of the box.
# Oct 3rd 2016, 12:40 hmic maikh: "replace" replaces.
# Oct 3rd 2016, 12:39 maikh no one has a hint for me?
# Oct 3rd 2016, 12:36 WebDevB hmic: I'll have a look now.
# Oct 3rd 2016, 12:36 dakota WebDevB, check your webserver, php and cakephp logs
# Oct 3rd 2016, 12:36 hmic 3. check the modules enabled in php and the webserver for differences (new ones and missing ones) report a list of your findings - we are rather looking at the webserver now, not php actually
# Oct 3rd 2016, 12:35 dakota https://github.com/drmonkeyninja/cakephp-address/blob/master/Test/Case/View/Helper/AddressHelperTest.php
# Oct 3rd 2016, 12:35 dakota Neon1024, do what I do and copy somebody else :slightly_smiling_face:
# Oct 3rd 2016, 12:35 WebDevB New webserver