Updating embedded document with timestamp / MongoDate
Pretty much 3 files controller and two models.
The paste should be self explanatory but basically I'm trying to empty embedded document in Users object and then reinsert the same data with different timestamp in one of the fields as Warnings model object.
Users model has three fields _id, login and warnings which is an array. Warnings model has three fields _id, user_id (MongoId) and created (MongoDate).
The problem is that although I'm doing the same exact things (Simple tteration over the process with changing time() as the only difference) sometimes ( seems like with certain timestamps ) timestamp isn't cast to MongoDate and when that happens user_id isn't cast to the MongoId as well.
I tried checking the query in \lithium\data\Model::save() but it seemed fine. _data and _original had timestamp while _updated had an MongoDate object. I could have missed something though.
I wanted to do a proper test case for this but seeing as I didn't do many things with mocks I decided to give up with that for now.
Hi @fitzagars, this issue seems to have already been solved in #471. Can you confirm ?
Closing as this seems to be solved.
@fitzagard and @Necsord, feel free to reopen if the issue persists. Thanks for reporting the problem.