mongodb-odm
mongodb-odm copied to clipboard
Support customCollection attribute for hash and collection types
Since custom collections can be converted to and from array
it seems reasonable to support the customCollection
attribute for types that represent an array such as hash
and collection
. When customCollection
is specified Doctrine should automatically marshal the array to/from the the specified collection class.
Just a note, this will require the field mapping to be passed into Type
, and once we do so we could also introduce a flag for date
to return DateTimeImmutable
I'd like to offer an unbiased viewpoint on this matter: I think this is a really great idea that will turn some inelegant things nice again. Please add a "great idea :)" tag.
In absence of "great idea" I've slapped "idea" label, once we start creating official roadmap for 2.0 I may revisit them ;)
FWIW I've tried to implement this for 1.2 but with current state of UnitOfWork
's tracking changes it's way too hacky. Scheduling for 2.0 for now.
Should I take that to mean this will never be available in 1.x?
It depends, I may have some other idea for an implementation but it's still forming in the back of my head.
@malarzm Where are we with this?
Nowhere I'm afraid, haven't had much time for OS work lately :(
That feel when no custom collections.
We're aware of this issue and will implement the feature when we have the time. There is no need to remind us. Locking to collaborators until we start working on it.