i´m using flourish for my database tasks in my php application. Now i have the problem that the store method saves new datasets always severel times in the database.
$o1 = new Version();
$o1->setVersion(rand(1, 99999));
$o1->save();
var_dump($o1);
I get the linked output from the var_dump. http://pastebin.de/128872
Version is a child class from BaseModel, BaseModel is a child-class from fActiveRecord.
There is my method save():
public function save($forceCascade = false) {
if (parent::getCreatedAt() === null)
parent::setCreatedAt(time());
parent::setLastModifiedAt(time());
parent::store($forceCascade);
}
public function setCreatedAt() { return false; }
public function setLastModifiedAt() { return false; }
public function setId() { return false; }
public function store($force_cascade=false) { return false; }
Could someone help or does know if there are unfixed issues? Ive seen that flourish is not longer programmed... (Sorry for bad english :/ )
EDIT: Ive founded out that my browser call every page two times... i dont know why. So this problem is solved...
Ive found the issue / fail. If im using "view_source" from chrome it is calling the page two times. So my model was called twice and saved twice.