class RelationType(object):
    ONE_TO_MANY = "one_to_many"
    ONE_TO_ONE = "one_to_one"


class Relation(object):
    def __init__(self, cls):
        self.cls = cls


class HasOne(Relation):
    def get(self, id):
        return self.cls.get(id=id)


class HasMany(Relation):
    def get(self, id):
        value = []
        tokens = id.split(",")

        for token in tokens:
            value += (self.cls.get(id=token.strip()))

        return value

2baacfe9eeb022086177a0ada2b68d7c80f413d7
<mask token>


class HasOne(Relation):

    def get(self, id):
        return self.cls.get(id=id)


class HasMany(Relation):

    def get(self, id):
        value = []
        tokens = id.split(',')
        for token in tokens:
            value += self.cls.get(id=token.strip())
        return value

<mask token>


class Relation(object):

    def __init__(self, cls):
        self.cls = cls


class HasOne(Relation):

    def get(self, id):
        return self.cls.get(id=id)


class HasMany(Relation):

    def get(self, id):
        value = []
        tokens = id.split(',')
        for token in tokens:
            value += self.cls.get(id=token.strip())
        return value

class RelationType(object):
    <mask token>
    <mask token>


class Relation(object):

    def __init__(self, cls):
        self.cls = cls


class HasOne(Relation):

    def get(self, id):
        return self.cls.get(id=id)


class HasMany(Relation):

    def get(self, id):
        value = []
        tokens = id.split(',')
        for token in tokens:
            value += self.cls.get(id=token.strip())
        return value

class RelationType(object):
    ONE_TO_MANY = 'one_to_many'
    ONE_TO_ONE = 'one_to_one'


class Relation(object):

    def __init__(self, cls):
        self.cls = cls


class HasOne(Relation):

    def get(self, id):
        return self.cls.get(id=id)


class HasMany(Relation):

    def get(self, id):
        value = []
        tokens = id.split(',')
        for token in tokens:
            value += self.cls.get(id=token.strip())
        return value

class RelationType(object):
    ONE_TO_MANY = "one_to_many"
    ONE_TO_ONE = "one_to_one"


class Relation(object):
    def __init__(self, cls):
        self.cls = cls


class HasOne(Relation):
    def get(self, id):
        return self.cls.get(id=id)


class HasMany(Relation):
    def get(self, id):
        value = []
        tokens = id.split(",")

        for token in tokens:
            value += (self.cls.get(id=token.strip()))

        return value
