I just tried using xpdo->getObject() with an "xpdo->newQuery" criteria as the second parameter.
I’ve noticed that a field that was not explicitly mentioned in the "$criteria->select()" had its default value returned, even after using "->get(’fieldname’)".
In this case, the database value was not the default value, and it would always return the default.
Once I added the field name e.g.
$criteria->select($xpdo->getSelectColumns('ClassName', 'CustomAlias', null, array('id','THE_FIELD_THAT_I_WANT'));
I was finally able to get the correct value via:
$MyXpdoObj->get('THE_FIELD_THAT_I_WANT')
This is the first time I’ve hit this anomaly, since I almost never use $criteria with ->getObject() - I generally use an array.
Please note that the returned xPDOObject seems fine in every other respect.
I’m running an older version of XPDO 2.0 on ModX Evo 1.0.4.