You are not logged in.
In some cases, it would by nice to have an overload function TSQLRecord.FillOne(Options: TJSONToObjectOptions=[]);
The problem is that I try to connect to the mongoDB server with a "very old" documents. At the moment not all fields in the collection are actual, but since the collection stores old values, I need to create too many dummy fields in my TSQLRecord class,
so adding [j2oIgnoreUnknownProperty] to FillOne call would solve the problem. What do you think?
Last edited by DigDiver (2018-04-30 11:05:09)
Offline
Nobody needs?
Offline
IIRC j2oIgnoreUnknownProperty has nothing to do with TSQLRecord ORM fields: it is about TDocVariant serialization.
What is the exact problem/exception raised with such an old DB?
I supposed old fields are just ignored by TSQLRecord.Fill.
Offline
IIRC j2oIgnoreUnknownProperty has nothing to do with TSQLRecord ORM fields: it is about TDocVariant serialization.
What is the exact problem/exception raised with such an old DB?
I supposed old fields are just ignored by TSQLRecord.Fill.
The TSQLRecord.Fill does not ignored unknown fields and deserialization stops on unknown fields.
Offline