Hello,

I am in need to write to BLOB column with doctrine 2. (Oracle DB) 

As documentation suggests BLOB type maps to PHP resource. So I tried 
fwrite() and it doesn't work... :(

Here is a example:

/**
 * @Entity @Table(name="products")
 **/class Product{
    /** @Id @Column(type="integer") @GeneratedValue **/
    protected $id;

    /** @Column(type="blob") **/
    protected $fileResource;

    public function getFileResource() {
       return $this->fileResource;
    }

    // .. (other code)}

My test case (couldn't find a official example):

$product = new Product();
fwrite($product->getFileResource(), "The Data");
$em->persist($product);
$em->flush();

What is my mistake?

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to