class MultiListParent(tests.UUIDAutoModel):
    children = sheraf.LargeListAttribute(
        sheraf.ModelAttribute("MultiListChild")).index()
Beispiel #2
0
 class Model(sheraf.Model):
     table = "model_table"
     dummy_attribute = sheraf.ModelAttribute(DummyModel).index(
         unique=True, values=lambda x: {x.val}
     )
Beispiel #3
0
class Model3k(sheraf.Model):
    table = "model3k_table"
    simple = sheraf.SimpleAttribute(lazy=False)
    obj_indexed = sheraf.ModelAttribute(DummyModel, lazy=False).index(
        unique=True, key="obj", values=lambda x: {x.v})
Beispiel #4
0
 class Model(tests.UUIDAutoModel):
     models = sheraf.SetAttribute(sheraf.ModelAttribute(AModel))
Beispiel #5
0
 class Model(tests.UUIDAutoModel):
     submodels = sheraf.ListAttribute(
         sheraf.ModelAttribute(Submodel),
         persistent_type=persistent_type,
     ).index()
Beispiel #6
0
 class AnotherModel(tests.UUIDAutoModel):
     a_set_for_test = sheraf.SetAttribute(sheraf.ModelAttribute(model))
Beispiel #7
0
 class Model(tests.UUIDAutoModel):
     submodel = sheraf.ModelAttribute(Submodel1)
Beispiel #8
0
class SupmodelModule(tests.UUIDAutoModel):
    submodel = sheraf.ModelAttribute("SubmodelModule")
Beispiel #9
0
 class Model(tests.UUIDAutoModel):
     submodel = sheraf.ModelAttribute((Submodel1, Submodel2)).index()
Beispiel #10
0
 class _AnotherModel(tests.UUIDAutoModel):
     a_dict_for_test = sheraf.LargeDictAttribute(sheraf.ModelAttribute(AModel))