Welcome Guest, Not a member yet? Register   Sign In
A check if model has anything to update
#9

(04-18-2022, 04:31 PM)kenjis Wrote: Entity represents a single database row.
So I must say you should not fill properties that does not exist in database field.
And a form is not a database table.
CodeIgniter's documentation says something different, please take a look at Using Entity Classes → Entity Usage → Filling Properties Quickly

Quote from manual:
Quote:when saving through the model, only the fields in $allowedFields will actually be saved to the database, so you can store additional data on your entities without worrying much about stray fields getting saved incorrectly

Does it mean documentation isn't accurate there?
Reply


Messages In This Thread
RE: A check if model has anything to update - by rmilecki - 04-19-2022, 02:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB