# |
Apr 21st 2017, 10:07 |
hmic |
you can save deep with this |
# |
Apr 21st 2017, 10:06 |
hmic |
arrays take . notation |
# |
Apr 21st 2017, 10:06 |
hmic |
ah, it's right there, you can pass arrays too |
# |
Apr 21st 2017, 10:06 |
hmic |
you can pass arrays to associated too IMHO |
# |
Apr 21st 2017, 10:05 |
technofection |
associated: If true it will save 1st level associated entities as they are found in the passed $entity whenever the property defined for the association is marked as dirty. If an array, it will be interpreted as the list of associations to be saved. It is possible to provide different options for saving on associated table objects using this key by making the custom options the array value. If false no associated records will be saved. |
# |
Apr 21st 2017, 10:04 |
technofection |
https://api.cakephp.org/3.3/class-Cake.ORM.Table.html |
# |
Apr 21st 2017, 10:04 |
hmic |
where would the docs say so? |
# |
Apr 21st 2017, 10:04 |
technofection |
But now the main question.. |
# |
Apr 21st 2017, 10:04 |
dereuromark |
Well, there you go then |
# |
Apr 21st 2017, 10:04 |
technofection |
The docs says 1 level though.. |
# |
Apr 21st 2017, 10:03 |
dereuromark |
I ever saved 1 level deep, but others might know more. I would suspect it to be able to save deeper. |
# |
Apr 21st 2017, 10:03 |
dereuromark |
I think you should ask the whole channel here. |
# |
Apr 21st 2017, 10:03 |
technofection |
The first question is, I can only save associated data upto 1 level, right? |
# |
Apr 21st 2017, 10:02 |
technofection |
I already asked this before some time here, but here it is again |
# |
Apr 21st 2017, 10:01 |
dereuromark |
sure |
# |
Apr 21st 2017, 10:01 |
technofection |
Hi @dereuromark , Can I ask you one question please? |
# |
Apr 21st 2017, 10:01 |
rudy1976s |
I will try again with FP |
# |
Apr 21st 2017, 09:59 |
rudy1976s |
ok @dereuromark |
# |
Apr 21st 2017, 09:59 |
dereuromark |
Dont get that part :slightly_smiling_face: |
# |
Apr 21st 2017, 09:59 |
dereuromark |
But why would you then ask a generic question again? "Hello is there a way to inject variables into events like beforeSave, available for all models" |
# |
Apr 21st 2017, 09:58 |
rudy1976s |
:slightly_smiling_face: |
# |
Apr 21st 2017, 09:58 |
rudy1976s |
I know that is something wrong on my side |
# |
Apr 21st 2017, 09:58 |
hmic |
if it did not work for you, you have not done it thorowly enough :p |
# |
Apr 21st 2017, 09:58 |
rudy1976s |
but it does not alter fields in any way |
# |
Apr 21st 2017, 09:58 |
rudy1976s |
regarding muffin/Fp I have followed the docs and configured |
# |
Apr 21st 2017, 09:57 |
hmic |
i still encourage you to use Muffin/Footprint and dont roll your own solution |
# |
Apr 21st 2017, 09:57 |
hmic |
if you wanna do it yourself, check Ceeram/Blame on github to get the idea of how it would work |
# |
Apr 21st 2017, 09:56 |
dereuromark |
why not? its super easy, I used it to make version behavior having a user inside the models: https://github.com/josegonzalez/cakephp-version#storing-user_id-as-meta-data |
# |
Apr 21st 2017, 09:56 |
rudy1976s |
I tried Muffin/Footprint but i was not able to make it work |
# |
Apr 21st 2017, 09:55 |
dereuromark |
see the logs |
# |
Apr 21st 2017, 09:55 |
dereuromark |
I think every day the topic footprint was the main one discussed |
# |
Apr 21st 2017, 09:55 |
hmic |
rudy1976s: use Muffin/Footprint |
# |
Apr 21st 2017, 09:55 |
dereuromark |
you havent been much around here I guess :slightly_smiling_face: |
# |
Apr 21st 2017, 09:54 |
rudy1976s |
I would need to have the logged user data on every beforeSaver |
# |
Apr 21st 2017, 09:54 |
rudy1976s |
behaviors |
# |
Apr 21st 2017, 09:54 |
dereuromark |
components? |
# |
Apr 21st 2017, 09:53 |
dereuromark |
behaviors? |
# |
Apr 21st 2017, 09:53 |
rudy1976s |
Hello is there a way to inject variables into events like beforeSave, available for all models ? |
# |
Apr 21st 2017, 09:51 |
Neon1024 |
Morning everyone |
# |
Apr 21st 2017, 09:49 |
hmic |
i need to stop answering these questions. at least to these kind of guys without any reference to cakephp :-/ |
# |
Apr 21st 2017, 09:48 |
roshan |
hmic, Ok thanks :-) |