On Wed Dec 05 12:52:27 2012, rharkins wrote:
Show quoted text> Using deep structures can trigger an "unhandled" event inside of
MongoDB.
Show quoted text> It is unclear whether the issue is related to Mongoose or not, but it
> evidences itself there via EmbeddedDocument.
>
> Running the attached script will produce:
>
> type (Y) unhandled at .../perl5/site_perl/5.12.4/x86_64-
> linux/MongoDB/Collection.pm line 296.
>
> Mongoose 0.13 and 0.20 both show this.
>
> Debian Linux slam-dev01 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC
> 2012 x86_64 GNU/Linux
> perl 5.12.4
The attachment didn't seem to work on the original post. I'm
reattaching it and pasting it:
package X;
use Moose;
with 'Mongoose::Document';
has y => ( is => 'ro', isa => 'HashRef[ArrayRef[Y]]' );
package Y;
use Moose;
with 'Mongoose::EmbeddedDocument';
package main;
use Mongoose;
Mongoose->db('xyz');
my $x = new X( y => { y => [ new Y() ] } );
$x->save;