class Father(Entity):
    name = Field(Unicode(100))
    children = OneToMany('Child')
class Child(Entity):
    name = Field(Unicode(100))
    father = ManyToOne('Father')
示例#3
0
class Child1_4(Entity):
    name = Field(Text)
    parent = ManyToOne('Parent1_4')
class Language(Entity):
    using_options = {'auto_primarykey': False}

    id = Field(Unicode(50), primary_key=True)
    label = Field(Unicode(50))
示例#5
0
class Child1_3(Entity):
    name = Field(Text)
    parent = ManyToOne('Parent1_3', inverse='children')
示例#6
0
class Parent1_4(Entity):
    name = Field(Text)
    children = OneToMany('Child1_4')
示例#7
0
class Parent1_2(Entity):
    name = Field(Text)
    children = OneToMany('Child1_2', inverse='parent')
示例#8
0
class Child1_2(Entity):
    name = Field(Text)
示例#9
0
class Engine4_4(Entity):
    name = Field(Text)
    car = ManyToOne('Car4_4')
示例#10
0
class Car4_4(Entity):
    name = Field(Text)
    engine = OneToOne('Engine4_4')
示例#11
0
class Engine4_3(Entity):
    name = Field(Text)
    car = ManyToOne('Car4_3', inverse='engine')
示例#12
0
class Car4_3(Entity):
    name = Field(Text)
    engine = OneToOne('Engine4_3', inverse='car')
示例#13
0
class Engine4_2(Entity):
    name = Field(Text)