Skip to content

Instantly share code, notes, and snippets.

@andrefs
Created October 3, 2012 16:31
Show Gist options
  • Save andrefs/3828094 to your computer and use it in GitHub Desktop.
Save andrefs/3828094 to your computer and use it in GitHub Desktop.
Elastic::Model 'extends' MWE
package MyApp;
use Elastic::Model;
has_namespace 'myapp' => {
user => 'MyApp::EMUser',
};
package MyApp::User;
use Moose;
has 'name' => (is => 'rw', isa => 'Str');
package MyApp::EMUser;
use Elastic::Doc;
extends 'MyApp::User';
package main;
my $model = MyApp->new;
__END__
Class (MyApp::EMUser) does not do Elastic::Model::Role::Doc. Please add : use Elastic::Doc;
at native delegation method Moose::Meta::Class::__ANON__::SERIAL::7::class_for (get) of attribute doc_class_wrappers (defined at /home/andrefs/.perl5/perls/perl-5.16.1/lib/site_perl/5.16.1/Elastic/Model/Role/Model.pm line 80) line 13.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment