I'm facing a modelization problem where i can't find a satisfying solution.
My problem:
- I want to modelize a simple OneToMany relationship between two entities
- These entities are from an external source. I can get them in a tsv format, but i have to clean them before persisting
- My app is developped in Python, but since its more the concept/reflexion that I want to really understand, we can talk over language that are more object oriented
My Question:
I don't know how to build my classes to answer this need.
- Should I use a single class that extracts, get, query and updates my entity ?
- Should I use a repository pattern ? But since I have two entities and a relationship between them, how do I handle all the entities references in the Repository class ?
- Is there any other pattern that could suit my need ?
Thanks !
Aucun commentaire:
Enregistrer un commentaire