Active
Project:
Drupal core
Version:
main
Component:
database system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Anonymous (not verified)
Created:
2 Oct 2012 at 17:17 UTC
Updated:
9 Mar 2022 at 12:26 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedThis isn't a task but a feature request for something not yet implemented. Feature requests belong in 8.x-dev. I don't know the validity of the request.
Comment #2
Anonymous (not verified) commentedThis is still not implemented in D8. I thought that this code will do the trick but obviously
drupal_write_record()is not used to execute queries(:))schema.inc #427 - #433
I created a table with one serialized column(blob) and used simple insert query:
and I retrieved the data with:
which returned a STRING 'test'. So I tried to insert array with more than one value(
array('test', 'something', 'else')) which returned an error:I also tried to insert serialized string and query returned it correctly - unserialized. So from my understanding there is still no 'serialized' support implemented.
I understand that this cannot work with
db_query()but In my opinion this is a must when usingdb_select().Comment #3
Anonymous (not verified) commentedI'm bumping into this issue again in D8(Alpha 7). From my perosnal experience this is can be a tremendous PIA so I'm changing the priority. Maybe someone won't agree but again, I see this too often to ignore.
Comment #4
Anonymous (not verified) commentedFor example, I have a content entity which has serialized field. In order to be able to work with it properly I have to use this code:
Comment #5
Crell commentedIMO, the serialize flag in schema API should be removed. It has nothing to do with databases and is an application-level question. It was only added, I think, for drupal_write_record(), which we are trying to remove anyway: #1774104: Replace all trivial drupal_write_record() calls with db_merge()
Comment #6
jhedstromre: #5 can this be re-classified as a task and completed in 8.0.x, or is this 8.1.x, or even 9.0.x material?
Comment #7
jhedstromAnd by 'this', I mean changing this issue to be about the removal of the serialize flag.
Comment #8
Crell commenteddrupal_write_record() is gone now, isn't it?
We should remove the serialize flag, but I fear that won't pass beta evaluation. It's an API change, even if it's removing an API that isn't being used. I suspect we'll have to retitle this issue but target it at Drupal 9 at this point. :-(
Comment #9
jhedstromMoving to task.
Comment #18
jcisio commentedI guess it can only be removed in the next major release.