Phalcon model saves everything except new added attributes

69 Views Asked by At

I received an update of a Phalcon model class and I had to update my local data table with the new attributes the model contains. Usually this kind of operation is not a problem, I simply launch an alter SQL query on the to add the columns, assign values to the object, call save and that's it.

However this time something strange happened: when I call save() on the model, everything is updated/created except the two new attributes I've added in my table. I checked the logs to take a look at the raw SQL query and the two new attributes are missing, the funny thing is that this operation worked the first times I tested it.

I think this error might come from the framework, after debugging my code I see clearly that the model takes the new values but for some reason cannot pass it to the SQL query.

Thus my question is the following: is there a way to force the Phalcon model to be sync again with my table?

0

There are 0 best solutions below