Closed mcherb closed 2 years ago
I think you should insert "movies_title" in the addKeys() method.
see Null elimination chapter : https://simpleflatmapper.org/0203-joins.html
yes, but in my real case I can't get a uniq id, I want objects to be duplicated (sometimes)
I think it causes less issues if each joined table have a child object. you could have a list of Nationality and like @n1b0r mentioned add all primary keys in addKeys(movies_id, nationality_id)
I have this query :
as you can see I'm joining the actor with 2 tables to get all its movies and at the same time its nationality.
Mapping classes are like the following :
I get my actor's list but in some objects where the actor didn't have played in any movie yet the list
movies
may contains objects like :movies = [Movie(title= null, gender = null)] // or multiple values if the actor have multiple nationalities
Any idea to get rid of these objects ?