Model refusing to insert data |
(01-08-2021, 08:28 AM)demyr Wrote: What is the error you receive? Alright a bit of an update on things since I've figured out why I was having issues with entity classes not working (was a filename problem I didnt read the docs closely enough) Okay, so now I've got data coming in from a POST req, I have already verified that the incoming data structure matches what I'm expecting. I'm able to validate the data, populate my user entity, it uses the setter methods I wrote, all is well here. The snag I'm hitting now is when I go to insert the data to my database. Using the save/insert method inherited from CodeIgniter\Model returns false, and I can't wrap my head around why. At this point in time, I'm passing the user entity object to that save/insert method, which should automatically convert my data to an array. I tried doing that part myself by calling toArray() on my entity, and have verified that that does not do anything unexpected either and my data remains intact. Still no luck with insert or save. Nothing explicitly throws an error, if something is failing (which it is) then it's doing so silently. |
Messages In This Thread |
Model refusing to insert data - by cantinsertdata - 01-06-2021, 10:10 PM
RE: Model refusing to insert data - by berendbotje91 - 01-07-2021, 04:35 AM
RE: Model refusing to insert data - by cantinsertdata - 01-07-2021, 02:05 PM
RE: Model refusing to insert data - by demyr - 01-08-2021, 08:28 AM
RE: Model refusing to insert data - by cantinsertdata - 01-08-2021, 01:12 PM
RE: Model refusing to insert data - by includebeer - 01-09-2021, 07:21 AM
RE: Model refusing to insert data - by cantinsertdata - 01-10-2021, 12:02 AM
RE: Model refusing to insert data - by wdeda - 01-09-2021, 08:00 AM
RE: Model refusing to insert data - by berendbotje91 - 01-11-2021, 12:37 AM
RE: Model refusing to insert data - by cantinsertdata - 01-11-2021, 11:14 AM
RE: Model refusing to insert data - by paulbalandan - 01-12-2021, 09:58 AM
|