The manual says:
Likewise,
binary
columns will accept file handles, and generate file handles when reading data.
I'm seeing it do this. I have a table users
with a column my_blob
. I did the bake all, so now I have a Table Users with an Entity User. If I get $user
then $user->my_blob
is a file handle (or stream) resource, not a string or something I can access directly. Reading the data may be easy enough fread($user->my_blob, 256)
. But writing to it would be extremely cumbersome. I think I'd have to create a file to store my data then write to that or something like that.
How do I write to a BLOB field?