A movie aficionado is buying and collecting movies in the mp4 format on an external 2 TB harddrive. So far he has tried to use a system where he puts them in different folders, depending on their IMDB rating and the category of the movie. As the collection has grown the categories is becoming an increasing problem. Here we come with a solution !
What if u want to call getAllMovies and they are not record inside the database ? What result we are getting ?
Because when u want to getAllMoviesByCategoryId u will get sql exception how that can happen ?
I found that we can add movie without anything because front-end is storing initial value for rating and other so It will always be able to be inserted ... I will handle validation on the front end but can we look later into how we could maybe secure it also on the back end ? :)
This is just note for later if we could look more (or I can) to tidy up the MovieDAO with the categories
Patrik dont get me wrong I love u spend so much time but just reading it makes me so confused for such a simple query that needs to map categories :)
But do not spend time on it now since we have more important stuff to do !
and why do I care to much just try to imagine the movie will have more aggregation ... or another nested stuff than can you imagine how f crazy our getAllMovies will get ? plus do you think when someone comes after you to watch this code they will be like yep that what I need to add here or modify
The home button does nothing except fetching again all movies ? do we really need it there ?
since we are not planning to expand for another views then maybe we can just get rid of it :)
When movie is updated and different categories are selected and update is executed then It does not update all movie properties especially the categories ?
Also why are we updating the lastViewed/seen in update of the movie when we agreed on only updating the query when movie is played ?
Why are we deleting the CatMovie also ?
Is this necessary since we are having on delete cascade so that It wont leave anything behind when the movie is deleted ?
When u search on all movies and then you will go to specific category and then you go back to movies it does not want to switch scenes ? Can we take a look at it ? :) branch -> setup/filter