Open GoogleCodeExporter opened 8 years ago
Figured out a solution: Calling PersistableClass.enforceObjectIsValidBySchema
in PersevereFilter.postObject().
Attached is a patch, please review.
Original comment by remoun.metyas
on 22 Jul 2010 at 9:06
Attachments:
After some more testing with the patch from my previous reply, the last note in
the original bug report still exists:
> Even stranger, the new item doesn't appear when loading 'Stock/' (or
Stock.instances in JS), but loading the specific item [e.g. Stock/3] does
return the (malformed) item!
The POST does result in a 400, but the obj seems to be held in memory -- GET by
ID shows the malformed item, but it goes away after restarting Persevere. The
ID is also skipped over when the next valid instance is creating (e.g. if
max(ID) = 18 when a bad request is made, Stock/19 would still return the
malformed object, until Persevere is restarted. But even after it is restarted,
the next object would get ID 20).
Might this have anything to do with JavascriptDB holding on to references until
a commit?
Original comment by remoun.metyas
on 23 Jul 2010 at 6:37
Original issue reported on code.google.com by
remoun.metyas
on 22 Jul 2010 at 12:10