I am using xPDO to persist a new object. Here is stripped down code:
$newEvent = $xpdo->newObject( "EpMemberevents" );
$newEvent->set( "memberEventId", 105);
if ($newEvent->save() == false) {
$errorText = $newEvent->xpdo->errorInfo();
echo "Error: " . $errorText[0] . "\n";
}
When I run the above code, xPDO report error 00000.
What does xPDO error 00000 mean?
The errorInfo method always returns 00000, see this thread
http://modxcms.com/forums/index.php?topic=49941.0
Use MODx, or the cat gets it!
If it’s any help, newObject() returns null on failure and set() returns false on failure.
At least you could test to see which one is failing.
Should it be:
EpMemberEvents
Did you modify the schema XML file to define the EPMemberevents object?
I did not modify the schema at all.
The schema was generated by xPDO. Retrievals work fine.
I even trying connecting using the root user. No luck either.
Tried the following as well:
$errors = array ();
$xpdo->setLogTarget(array(
’target’ => ’ARRAY’
,’options’ => array(’var’ => & $errors)
));
Setting the log target did not help either.
Any help would be appreciated.
From above
http://modxcms.com/forums/index.php/topic,49941.0.html
, XPDO does NOT support the errorInfo method, you can’t get round this at the moment.
Use MODx, or the cat gets it!