# |
Jan 21st 2019, 12:30 |
neon1024 |
Guess that’s why! ;) |
# |
Jan 21st 2019, 12:30 |
neon1024 |
I did wonder why I always used `$entity->set('thingies', $newEntity)` |
# |
Jan 21st 2019, 12:26 |
spriz |
A little adjustment and it seem to work. Can’t just put it into the newEntity argument it seems :thihnk |
# |
Jan 21st 2019, 12:22 |
neon1024 |
Yeah, I reckon that might work |
# |
Jan 21st 2019, 12:16 |
spriz |
you mean like that @neon1024? |
# |
Jan 21st 2019, 12:16 |
spriz |
https://gist.github.com/Spriz/9b76bcfc07785d578e3c2b8df2581753 |
# |
Jan 21st 2019, 12:08 |
neon1024 |
You could make a Company entity and assign that? |
# |
Jan 21st 2019, 12:05 |
spriz |
Is there some smarter way to do this? Without enabling mass assignment for the `id` field? |
# |
Jan 21st 2019, 12:05 |
slackebot1 |
I wouldn’t like that in all other actions :thinking_face: |
# |
Jan 21st 2019, 12:05 |
spriz |
I have a question about the ORM/Marshaller with relations - I hope someone can enlighten me. Whenever I want to save an entity with a relation to an existing BelongsTo entity, but change some data on the BelongsTo I end up making 2 different `patchEntity` because I cannot make this work: https://gist.github.com/Spriz/f6ab3d56219092957cfcef76e28e43a4 for it to work, the `'id'` needs to be mass assignable for the `companies_vendor` entity, but |
# |
Jan 21st 2019, 10:56 |
yamcomnet |
this is the exact solution. no worries |
# |
Jan 21st 2019, 10:54 |
neon1024 |
I knew if I asked, I’d find it. `typeMap()`, was expecting `getTypeMap()` or `getTypes()` |
# |
Jan 21st 2019, 10:53 |
neon1024 |
Anyone know if I can get the typemap from the schema? I can see the `$_typeMap` but no accessor method. I’d rather get that property, than get the columns and foreach them calling `getType` on each one |
# |
Jan 21st 2019, 10:49 |
yamcomnet |
anyone has good strategy to implement ajax pagination? closest i got to clean solution was https://discourse.cakephp.org/t/how-to-do-ajax-pagination-in-cakephp-3-x/1018/5 |
# |
Jan 21st 2019, 10:38 |
josbeir |
gives more headaches in the end |
# |
Jan 21st 2019, 10:38 |
josbeir |
never liked encryption on the db lvl |
# |
Jan 21st 2019, 10:38 |
josbeir |
would also go for that |
# |
Jan 21st 2019, 10:38 |
josbeir |
yup |
# |
Jan 21st 2019, 10:38 |
neon1024 |
Plus it keeps the encryption in the application, rather than in the database |
# |
Jan 21st 2019, 10:38 |
neon1024 |
Yeah, this is the first time I’ve had to tackle it, so figured a custom data type would be easiest and most obvious |
# |
Jan 21st 2019, 10:37 |
josbeir |
so overthinking stuff... |
# |
Jan 21st 2019, 10:37 |
josbeir |
because you can do encryption on db lvl too :P |
# |
Jan 21st 2019, 10:37 |
neon1024 |
:P |
# |
Jan 21st 2019, 10:37 |
josbeir |
yup |
# |
Jan 21st 2019, 10:37 |
neon1024 |
Coffee for @josbeir! |
# |
Jan 21st 2019, 10:37 |
josbeir |
mondays.. |
# |
Jan 21st 2019, 10:37 |
josbeir |
:) |
# |
Jan 21st 2019, 10:37 |
josbeir |
would v been better |
# |
Jan 21st 2019, 10:36 |
josbeir |
"Ah, perhaps because my content in the db isn’t encrypted yet!" |
# |
Jan 21st 2019, 10:36 |
neon1024 |
> I’ll write a shell to manually encrypt my fields first |
# |
Jan 21st 2019, 10:36 |
neon1024 |
> Ah, perhaps because my db isn’t encrypted yet! |
# |
Jan 21st 2019, 10:36 |
josbeir |
i'm a developer.. |
# |
Jan 21st 2019, 10:36 |
josbeir |
i'm probably overthinking the issue at hand :P |
# |
Jan 21st 2019, 10:36 |
neon1024 |
Exactly |
# |
Jan 21st 2019, 10:36 |
josbeir |
errr, it will just return nothing interesting... :P |
# |
Jan 21st 2019, 10:35 |
neon1024 |
:slightly_smiling_face: |
# |
Jan 21st 2019, 10:35 |
neon1024 |
How does decrypt respond to being given a string which is not encrypted? |
# |
Jan 21st 2019, 10:35 |
josbeir |
uhu, still a string :P |
# |
Jan 21st 2019, 10:35 |
neon1024 |
Yes, an encrypted string |
# |
Jan 21st 2019, 10:35 |
josbeir |
? |
# |
Jan 21st 2019, 10:35 |
josbeir |
ok but the thing you pass to that function is just a string no |