Skip to content

Ordered metadata #131

Answered by daveaglick
laurentkempe asked this question in Q&A
Feb 3, 2022 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

Unfortunately the metadata is inherently unordered because it's implemented at a very low level as a dictionary. Very early in the project I experimented with some sort of ordering for metadata, but it quickly became intractable because of the way metadata is layered from global settings all the way down through document cloning, etc. There are just too many places it could come from and be overridden to establish a single ordering methodology.

That said, what you want to do here isn't an unusual pattern. I usually accomplish it by adding an order item (I.e. order: 1, etc.) and then sorting on that where it needs to be ordered. There's even a strongly-typed Keys.Order key you can use in t…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@laurentkempe
Comment options

@laurentkempe
Comment options

@laurentkempe
Comment options

@daveaglick
Comment options

@laurentkempe
Comment options

Answer selected by laurentkempe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants