class Person(metaclass=dbclass.DBClass): personal_name = dbclass.DBValue(str) full_name = dbclass.DBValue(str) def __init__(self, personal_name, full_name=None): # __init__ should not be called when loading assert False
class Person(DBTestObject, metaclass=dbclass.DBClass): personal_name = dbclass.DBValue(str) full_name = dbclass.DBValue(str) def __init__(self, personal_name, full_name=None): self.personal_name = personal_name if full_name is None: full_name = personal_name self.full_name = full_name
class Person(metaclass=dbclass.DBClass): personal_name = dbclass.DBValue(str)
class Person(metaclass=dbclass.DBClass): personal_name = dbclass.DBValue(str) def __init__(self, personal_name, full_name=None): self.personal_name = personal_name
class ChildClass(ParentClass): data2 = dbclass.DBValue(int) def __init__(self, data1, data2): self.data2 = data2 ParentClass.__init__(self, data1)
class ParentClass(DBTestObject, metaclass=dbclass.DBClass): data1 = dbclass.DBValue(str) def __init__(self, data1): self.data1 = data1
class IntWrapper(DBTestObject, metaclass=dbclass.DBClass): data = dbclass.DBValue(int) def __init__(self, data): self.data = data
class UnicodeData(DBTestObject, metaclass=dbclass.DBClass): data = dbclass.DBValue(str) def __init__(self, data): self.data = data
class DoesNotExist(DBTestObject, metaclass=dbclass.DBClass): improbability = dbclass.DBValue(int)