Replies: 1 comment 1 reply
-
Why aren't you using polymorphism in this case?
So each "metadata" is just plain data on the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm having a problem identifying a proper way to model a document.
Let's assume we have
Vehicle Operations
which describeoperations related to a vehicle like
FuelAdd
,Repair
,TireChange
,CarWash
etc...Each of these operations has specific metadata.
The metadata could be a dictionary where the key would be a
metadata type like
fuelVolume
with the corresponding valuebut the tricky part is that
the value may not always be a primitive but may have more data
that belongs together (like the RepairMetadata.Part below where
quantity and comment relate to a specific part)
When retrieving data from RavenDb, one option would be to serialize
the metadata object and deserialize it into the expecting metadata type (doesn't sound performance friendly).
But in case I need to do some indexing, I guess it'll get messy easily?
Any suggestions what would be the RavenDb way to model this? :)
Beta Was this translation helpful? Give feedback.
All reactions