Ordering by array column #6070

Closed
opened 2026-01-22 15:26:09 +01:00 by admin · 2 comments
Owner

Originally created by @MassiveHiggsField on GitHub (Sep 20, 2018).

I couldn't find any documentation on this. How are serialized array columns sorted? Is it just a normal text order on the serialized string? Is it the first value in the array which determines the order?

To clarify, i don't mean how are the values in the array sorted, but what happens if i add an orderBy clause on an array column.

Originally created by @MassiveHiggsField on GitHub (Sep 20, 2018). I couldn't find any documentation on this. How are serialized array columns sorted? Is it just a normal text order on the serialized string? Is it the first value in the array which determines the order? To clarify, i don't mean how are the values in the array sorted, but what happens if i add an orderBy clause on an array column.
admin closed this issue 2026-01-22 15:26:10 +01:00
Author
Owner

@Ocramius commented on GitHub (Sep 20, 2018):

How are serialized array columns sorted?

By their serialized DB state, which is a PHP serialized string, hence unreliable.

@Ocramius commented on GitHub (Sep 20, 2018): > How are serialized array columns sorted? By their serialized DB state, which is a PHP serialized string, hence unreliable.
Author
Owner

@MassiveHiggsField commented on GitHub (Sep 20, 2018):

Alright thanks for the info.

@MassiveHiggsField commented on GitHub (Sep 20, 2018): Alright thanks for the info.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6070