def __finalize__(self, other, method=None, **kwargs): logger.info('Inside finalize') # if hasattr(self, 'properties'): # logger.debug(self.properties) # if self.has_property('key') is False: # self._add_key('_id') # else: # #self._set_key(self.get_key()) # logger.debug(self.properties) #logger.debug(self._metadata) #logger.debug(hasattr(self, 'properties')) if isinstance(other, MurTable): for name in self._metadata: object.__setattr__(self, name, getattr(other, name, None)) logger.debug(self.properties) if self.get_key() not in self.columns: self._add_key('_m_id') return self
def _constructor(self): logger.debug('Inside MTable constructor') return MurTable
def __init__(self, *args, **kwargs): logger.debug('Inside MTable init') key = kwargs.pop('key', None) super(MurTable, self).__init__(*args, **kwargs) if key is not None: self._set_key(key)