I have a very simple basic requirement creating application for taking papers of any domain. In this application, I store questions in questions table and its answers which can be single or multi in answers table.
I have table questions(id,question, ans1,ans2,ans3,ans4) and table answers(question_id,answer_id). Now in answers table there is no primary key, or I can make both the columns as primary key. also in my domain object Question I have a collection of Answers but my problem is because in table answers there are only two columns and in actual I don't need a class to represent this table, should I still create an Entity class for answers. Also what should be the primary key of this table, if we take both columns as the primary key, what should be generation strategy in entity class. Also what will be join condition.