Welcome Guest, Not a member yet? Register   Sign In
useSoftDeletes and insert

Hi !

I write this part of code in order to return time data (created_at field) to the client when he wants to insert a new message in the db :

PHP Code:
$insertId $message_model->insert($data);
$message $message_model->find($insertId);
$message $message_model->normalize_dates($message);

It's working fine.... except when I set "useSoftDeletes = true" into my "message_model" file. If I do that, find() method return "null" whereas $insertId seems to be correct.

Is that normal ?
Thanks !

Only use useSoftDeletes when you delete, you insert so do not need to set it or set it false if before setted

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams


useSoftDeletes shouldn't be protected ?
I can define a special function in the model but it's a nonsense (?)

Actually, I think there few solutions possible to solve my "problem" but isn't it a bug to be corrected ?

Theme © iAndrew 2016 - Forum software by © MyBB