New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Schema casting #567
Comments
Yeah, this is why I added |
Yeah of course, but before I just wanted to show you this following refactoring of the schema casting : Well if you don't like it, I'll re-add $object->myrelation = array(...);
|
Okay understood. Yeah, the refactoring makes sense (I'm guessing it's a BC break because of the change to |
Yes the casting strategy in the above commit works on any type of data array without re-adding The other "break" concern |
Yeah I think the fix makes a lot of sense. Having |
Fix `Schema::cast()` using according to #567
After some refactoring on data collection, it result the following in
DocumentSet::_init()
:if we stick on tests, everything looks like working fine but it's kinda weird.
DocumentSet
need to manage two types of array.Simple array :
And field based array :
To avoid edge effects what could be the best solution for this issue ? Reintroducing the
DocumentArray
with its ownDocument::__init()
extendingDocumentSet
? Or finding a way to dected passed datas to avoid having to use multiple classes ?The text was updated successfully, but these errors were encountered: