public function executeInsert(EntityMetadata $metadata, array $toInsert)
    {
        return $this->createQueryBuilder($metadata)
            ->insert()
            ->setNewObj($toInsert)
            ->getQuery()
            ->execute()
        ;
    }
public function executeInsert(EntityMetadata $metadata, array $toInsert)
    {
        return $this->createQueryBuilder($metadata)
            ->insert()
            ->setNewObj($toInsert)
            ->getQuery()
            ->execute()
        ;
    }
public function executeInsert ( EntityMetadata $ metadata , array $ toInsert ) { return $ this -> createQueryBuilder ( $ metadata ) -> insert ( ) -> setNewObj ( $ toInsert ) -> getQuery ( ) -> execute ( ) ; }
Executes an insert for the provided metadata.

@param   EntityMetadata  $metadata
@param   array           $toInsert
@return  array|bool
Executes an insert for the provided metadata .