This distinction apparently doesn't
This distinction apparently doesn't matter.
new Document
accepts DataModel
explicitly because new DataModel
does;
And then createDocuments
explicitly accepts Document
s but really accepts any compatible DataModel
:
They actually don't do anything special in code it's just when the request is serialized the toJSON
gets called and runs toObject
. So basically both accept just the same.
What does change is that after a certain point they're converted to an object. So I need a concept of ConstructorDataInInput
and ConstructorDataAsAnObjectInLifecycle
11 Replies
Threading because I anticipate conversation in this channel to go on
Nominally, the first is just the second in a union with
this
or whateverNot exactly
it's
DataModel<Schema, any, any>
I suppose nominally it may be that
but it accepts anything with a compatible schemaHow often do we think that's going to come up?
fair enough
well it could come up if you do something like
createDocuments([baseUser])
or something
I point to baseUser
specificallyI guess the distinction between say Actor and Actor.ConfiguredInstance might matter here?
because I'm unsure if we should be switching it over to configured or not-
yeah exactly
you couldn't pass an actor or a base actor through these
if it was
this
My understanding is we were using BaseUser for all the permission related checks for circularity reasons
Yeah, I recently tried switching again and hit that wall
Maybe I can get it working in the future, I'll put it onto my todo list
Do you think anyone would want to use something BESIDES
User.ConfiguredInstance
thoughNo don't think so
Yeah okay I'll ticket it
Looking in the circularity is a good idea anyways