(self)
return klass.objects._db
use the first connection available
        :rtype: Connection
use the first connection available
        :rtype: Connection
use the first connection available : rtype : Connection
def getConnection(self):
        """
        use the first connection available
        :rtype: Connection
        """

        klass = self.entities.keys()
        if not klass:
            raise AttributeError('No class found from entities. Did you add entities to the Populator ?')
        klass = list(klass)[0]

        return klass.objects._db
def getConnection ( self ) : klass = self . entities . keys ( ) if not klass : raise AttributeError ( 'No class found from entities. Did you add entities to the Populator ?' ) klass = list ( klass ) [ 0 ] return klass . objects . _db