def setConnection(self, connection):
<EOL>if not isinstance(connection, orb.Connection):<EOL><INDENT>conn = orb.Connection.byName(connection)<EOL>if not conn:<EOL><INDENT>raise orb.errors.BackendNotFound(connection)<EOL><DEDENT>connection = conn(self)<EOL><DEDENT>else:<EOL><INDENT>connection.setDatabase(self)<EOL><DEDENT>self.__connection = connection<EOL>
Assigns the backend connection for this database instance.

:param connection: <str> || <orb.Connection>