mongodb-odm icon indicating copy to clipboard operation
mongodb-odm copied to clipboard

Support customCollection attribute for hash and collection types

Open Bilge opened this issue 8 years ago • 11 comments

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.

Bilge avatar Jun 30 '16 12:06 Bilge

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

malarzm avatar Jun 30 '16 13:06 malarzm

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.

Bilge avatar Jul 06 '16 22:07 Bilge

In absence of "great idea" I've slapped "idea" label, once we start creating official roadmap for 2.0 I may revisit them ;)

malarzm avatar Jul 07 '16 09:07 malarzm

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.

malarzm avatar Jul 30 '16 11:07 malarzm

Should I take that to mean this will never be available in 1.x?

Bilge avatar Jul 30 '16 12:07 Bilge

It depends, I may have some other idea for an implementation but it's still forming in the back of my head.

malarzm avatar Jul 30 '16 12:07 malarzm

@malarzm Where are we with this?

Bilge avatar Dec 20 '16 13:12 Bilge

Nowhere I'm afraid, haven't had much time for OS work lately :(

malarzm avatar Dec 21 '16 18:12 malarzm

Bilge avatar Dec 21 '16 19:12 Bilge

That feel when no custom collections.

Bilge avatar May 12 '17 09:05 Bilge

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.

alcaeus avatar May 12 '17 09:05 alcaeus