I'm having trouble deciding how to represent a 'ReleaseDate' field in a 'Movie' entity in JPA. Take for example this movie. The class fields would look something like this:
@Entity
public class Movie {
private Long id;
private String name;
private Director director;
private List<Writer> writers;
private List<Actor> actors;
private List<ReleaseDate> releaseDates;
}
//@Entity ?
class ReleaseDate {
private String northAmericanReleaseDate;
private String europeanReleaseDate;
private String asianReleaseDate;
// add more locations here
}
If the movie can have mutliple release dates I'm not quite sure how to represent them. The above is what I have so far, and if a movie is not released in a location it will be null, implying not released in that location.
The bigger question is that I don't think ReleaseDate should be an entity/class as I don't think it warrants a row in a table with it's own ID. What's the best strategy here? Thanks.