Welcome Guest, Not a member yet? Register   Sign In
logging db actions via model events and id problem
#2

(01-12-2022, 12:55 PM)dgvirtual Wrote: So, I have two questions:
1. Is there a better way to get what I want?
2. Is this behaviour of hooks something that I should report as a bug or "needs improvement" thing for the team developing Codeigniter? Or would changing this behaviour be too much to ask for (and if so, why)?

There is no ID value in your code. It seems it is impossible to know the ID value without querying to the DB.

It seems it is a bit better to extend CodeIgniter\Model event to add a query to lookup the ID value and pass it to the callback.
Reply


Messages In This Thread
RE: logging db actions via model events and id problem - by kenjis - 01-12-2022, 07:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB