def save(self, force_eav=False, **kwargs):
<EOL>super(BaseEntity, self).save(**kwargs)<EOL>for schema in self.get_schemata():<EOL><INDENT>value = getattr(self, schema.name, None)<EOL>schema.save_attr(self, value)<EOL><DEDENT>
Saves entity instance and creates/updates related attribute instances.

:param eav: if True (default), EAV attributes are saved along with entity.