Let's say i have a few objects that are linked together by association. For Example, A Company Object and a Worker object. A company will have multiple worker under them. A company will have an arrayList of WorkerObj as a reference list to the worker object.
During the useage of DAO, do i save the company object as a whole with the worker object encapsulated into it. Or do i save a company object and than save the arrayList of WorkerObj?(after that i'll retrieve them and join them together)
The main idea is to save each company using dao to a file and retrive them later with the same state.
Please forgive me if i did make any wrong question. Please guide me for my learning!
Aucun commentaire:
Enregistrer un commentaire