class One(Model): _meta = {'_doc_type': 'model_one'} _mapping = { 'id': Keyword(name='id'), 'single': SingleJoin(name='single', source='test_connect.One', target='test_connect.Two') }
class Many(Model): __slots__ = ('id', 'value', 'one', 'one_id') _meta = {'_doc_type': 'model_many'} _mapping = { 'id': Keyword(name='id'), 'value': Keyword(name='value'), 'one': SingleJoin(name='one', source='test_join.Many', target='test_join.One'), }
class Parent(Model): __slots__ = ('id', 'value', 'child') _meta = {'_doc_type': 'model_parent'} _mapping = { 'id': Keyword(name='id'), 'value': Keyword(name='value'), 'child': SingleJoin(name='child', source='test_join.Parent', target='test_join.Child') }
class Key(Model): __slots__ = ('value', 'user', 'user_id') _meta = {'_doc_type': 'model_key'} _mapping = { 'id': Keyword(name='id'), 'value': Keyword(name='value'), 'user': SingleJoin(name='user', source='test_join.Key', target='test_join.User'), }
class IdManyWithReference(Model): __slots__ = ('id', 'value', 'one') _meta = {'_doc_type': 'model_many_wr'} _mapping = { 'id': Keyword(name='id'), 'value': Keyword(name='value'), 'one': SingleJoin(name='one', source='test_join.IdManyWithReference', target='test_join.IdOneWithReference:many'), }
class SelfJoin(Model): __slots__ = ('id', 'value', 'join') _meta = { '_doc_type': 'model_self_join', } _mapping = { 'id': Keyword(name='id'), 'value': Keyword(name='value'), 'join': SingleJoin(name='join', source='test_serialize.SelfJoin', target='test.serialize.SelfJoin') }