I have the following entity (Question) and a JoinTable with another entity(Topic).
Code:
@Entity()
@SequenceGenerator(name="QUESTION", sequenceName="QUESTION_SEQ", allocationSize=1)
public class Question implements Serializable {
...
@OneToMany
@JoinTable(
name="TOPIC_QUESTION",
joinColumns={@JoinColumn(name="QUESTION_ID")},
inverseJoinColumns={@JoinColumn(name="TOPIC_ID")}
)
private List<Topic> topics = new ArrayList<Topic>();
...
I've been trying to create a HQL passing a List of topics and it is not working. In such a case, how'd you write such a query????
thanks in advance
PS: I know there is a few others solutions (besides HQL... e.g. Criteria), but ive wanted a HQL solution