# |
Jun 19th 2018, 13:40 |
LubosR |
neon1024 thanks, trying again (feeling like I tried all of those) |
# |
Jun 19th 2018, 13:39 |
LubosR |
just did $conn->logQueries(true) to find out how insert look like and offer_type_id is not there. |
# |
Jun 19th 2018, 13:38 |
neon1024 |
..because it will assume you have an OfferTypes associated table class |
# |
Jun 19th 2018, 13:38 |
neon1024 |
As Cake will bake a rule for that |
# |
Jun 19th 2018, 13:38 |
neon1024 |
Also ensure that your save has `['checkRules' => false]` as you might have a rule if you have a baked table |
# |
Jun 19th 2018, 13:37 |
neon1024 |
Or, use patchEntity, and check `$entity->getErrors()` |
# |
Jun 19th 2018, 13:37 |
neon1024 |
You could check too `$entity->isDirty('offer_type_id')` I think the method is called |
# |
Jun 19th 2018, 13:36 |
neon1024 |
As long as you set it with `$entity->set('offer_type_id', $offerId)`, it should be fine |
# |
Jun 19th 2018, 13:36 |
neon1024 |
It shouldn’t exclude them unless there is a defined association |
# |
Jun 19th 2018, 13:34 |
LubosR |
What a mystery :) |
# |
Jun 19th 2018, 13:28 |
LubosR |
https://pasteboard.co/HqCtpZz.png here is method (it is shell which should read data from one connection and resave to other) |
# |
Jun 19th 2018, 13:27 |
LubosR |
So wondering if ORM does exclude fields _id somehow |
# |
Jun 19th 2018, 13:27 |
LubosR |
I did and no error, data are saved exclude this offer_type_id |
# |
Jun 19th 2018, 13:26 |
tim |
Did you save the changed entity? |
# |
Jun 19th 2018, 13:25 |
LubosR |
Firstly i did newEntity and then each field set by $entity->set(), now I am trying to pass $data as array to newEntity method |
# |
Jun 19th 2018, 13:24 |
neon1024 |
How is your entity constructed? Are you using `patchEntity()` with an array, or setting properties directly? |
# |
Jun 19th 2018, 13:20 |
LubosR |
And I can't add association because the model is not associated with OfferType (using generic cake table, not existing one) |
# |
Jun 19th 2018, 13:19 |
LubosR |
That's what I thought, but records are there, just this field is not saved |
# |
Jun 19th 2018, 13:18 |
neon1024 |
Perhaps you’re looking in the wrong database? |
# |
Jun 19th 2018, 13:18 |
neon1024 |
It’s marked as dirty as well |
# |
Jun 19th 2018, 13:18 |
neon1024 |
I don’t know why it wouldn’t save |
# |
Jun 19th 2018, 13:17 |
neon1024 |
Hah, from your screenshot we do the same job! |
# |
Jun 19th 2018, 13:16 |
neon1024 |
Well usually it would be expecting the associated property in the entity I would imagine |
# |
Jun 19th 2018, 13:15 |
LubosR |
neon1024 but at this case i do not care about association, i simply want to save offer_type_id no matter if association is contained. do i have to add association for fields ending _id? |
# |
Jun 19th 2018, 13:13 |
neon1024 |
LubosR, Perhaps the association is not contained in the entity which is set to the form |
# |
Jun 19th 2018, 13:11 |
LubosR |
anyone? |
# |
Jun 19th 2018, 13:05 |
LubosR |
orm cache cleared |
# |
Jun 19th 2018, 13:05 |
LubosR |
No error on save, it is in accessible list, all other fields are saved. |
# |
Jun 19th 2018, 13:02 |
LubosR |
Hi all, any idea why one field (offer_type_id) is not saved? see image https://pasteboard.co/HqCiMf0.png |
# |
Jun 19th 2018, 12:01 |
louis |
:fr: |
# |
Jun 19th 2018, 11:48 |
heke |
france. |
# |
Jun 19th 2018, 11:31 |
josbeir |
but germany is ok too :P |
# |
Jun 19th 2018, 11:30 |
josbeir |
@tim voted france tho, just it isnt in paris, that city's a bitch to drive |
# |
Jun 19th 2018, 10:08 |
neon1024 |
I voted for Germany :clap: |
# |
Jun 19th 2018, 09:46 |
Martin` |
for templates |
# |
Jun 19th 2018, 09:46 |
Martin` |
why do mailers not use a seperate template folders per mailer? :P |
# |
Jun 19th 2018, 09:39 |
tim |
But you wouldn't go to Wallonia, so why would you go to France?! |
# |
Jun 19th 2018, 09:38 |
tim |
Yeah I was wondering the same :P |
# |
Jun 19th 2018, 09:37 |
josbeir |
i live in between so... |
# |
Jun 19th 2018, 09:37 |
josbeir |
hmm germany or france what to choose :P |
# |
Jun 19th 2018, 09:23 |
scottmkroberts |
Thanks. |