umongo icon indicating copy to clipboard operation
umongo copied to clipboard

Improve Motor GenericReference field

Open molten-firescar96 opened this issue 3 years ago • 1 comments

I got a NotImpletemented exception when using .fetch on a generic reference field. This commit fixes the problem. I have a workaround, by declaring the reference_cls attribute explicitly in my own code, GenericReferenceField(reference_cls=MotorAsyncIOReference), but it seemed like a change I should submit upstream.

I noticed a related issue https://github.com/Scille/umongo/issues/349, so I'm trying to make this commit compatible.

What do you think?

molten-firescar96 avatar Jun 09 '21 02:06 molten-firescar96

Sorry about the delay.

I agree with this change. I pushed a branch where I tried this on Reference field (to fix #349 @richiq) and I'm happy with it.

https://github.com/Scille/umongo/tree/reference_cls

Do you think you could rework your PR to include those changes and add unit tests?

lafrech avatar Aug 27 '21 12:08 lafrech