Hey! I've been using Phalcon for some time now and just hit a new exciting issue - ONE of my models is unable to save to the DB - an email confirmation entity that is created alongside a user. The user is successfully created and inserted, but the confirmation is not. This worked before the weekend, but seeing as it is Monday, something has to go wrong.
Their ID column is the same:
int(10) unsigned (auto increment)
In my controller:
var_dump($confirmation->save()); // true
var_dump($confirmation->getMessages()); // array (size=0) empty
var_dump($confirmation->refresh()); // public 'id' => string '0' (length=1)
In the model:
public function afterCreate(){
if(!$this->id){
throw new \Exception("WTF"); // is thrown
}
}
I have looked at this discussion
and tried what it says (using create()
etc), but nothing seems to work. I'm losing my mind!! Please help!!