class B(self.Entity): has_field('name', String(100), primary_key=True)
class A(self.Entity): has_field('name', String(100)) has_and_belongs_to_many('bs', of_kind='B')
class Person(self.Entity): has_field('firstname', String(30)) has_field('surname', String(30))
class Tag(self.Entity): has_field('score1', Float) has_field('score2', Float) has_property( 'score', lambda c: column_property( (c.score1 * c.score2).label('score')))
class Animal( self.Entity ): has_field('name', String(30)) belongs_to('owner', of_kind='Person')
class Person( self.Entity ): has_field('name', String(30)) has_many('pets', of_kind='Animal')