Description
In a number of cases there is the need to write not strictly structured data. These fields are pairs of key->value, without any kind of schema (order, datatype, validation).
This has to be modeled and saved on the database. Main requisites are :
- The list of already used keys must be retrievable. Better if it's possible to retrieve this list associated to specific bean classes.
- The list of already used values idem.
- It should be possible to query these key-value pairs, with the following queries :
... Find beans of class X having K=V (applying all possible variations, like part of V, not V etc..)
... Find beans of class X having K
To keep the system lightweight :
- There is no need to query for all entities having K or K=V
- There is no need for multiple valued keys.
Proper editing/display hooks must be provided.