You are not logged in.
Hi AB,
using XE5 and the nightly build downloaded this morning,
I have a TSQLRecord descendant that contains a collection field. That collection contains derived CollectionItems. The derived CollectionItem class contains a field that is a record.
Serializing my TSQLRecord descendant to the DB works nicely. And since I use XE5, the record field in the collectiontem object is serialized nicely to json without any further registration calls beforehand.
However unserializing that TSQLRecord doesn't work. The collection isn't unserialized because in mORMot.JSONToObject in Line 31397:
if Kind<>tkClass then
exit; // true nested object should begin with '[' or '{'
Kind contains tkRecord and so at that point JSONToObject exits.
So in other words I can write my TSQLRecord to the db but can't read it because JSONToObject does expect a class. A Record is not supported there.
Would be great if that's added there.
What do you think?
Martin
Offline
Created the ticket with attached sample code to reproduce the problem.
Offline
Should be fixed now.
See http://synopse.info/fossil/info/c7899aa6a1c79
Thanks for the patch!
Offline