Closed Tinitto closed 1 year ago
It kind of seems like a dict might be better represented by a model
e.g.
class Score(Model):
_primary_key_field: str = 'id'
id: str
total: int
class ScoreBoard(Model):
_primary_key_field: str = 'id'
id: str
scores: Dict[str, Score]
might as well have been:
class Score(Model):
_primary_key_field: str = 'name'
name: str
total: int
class ScoreBoard(Model):
_primary_key_field: str = 'id'
id: str
scores: List[Score]
Currently a model like the
ScoreBoard
model below with the fieldscores
being a dictionary of string and Model fails to workIt raises the following exception:
Pydantic_redis version: 0.1.6