Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Eclipse link equivalent of Projections

Consider a bidirectional One-To-Many relationship between Question and
Choice, a Question has many choices.

???? whats an equivalent of @org.hibernate.annotations.IndexColumn which is
used to maintain the order in the list ?????

Question

@OneToMany (
cascade = {CascadeType.ALL},
fetch = FetchType.EAGER
)
@JoinColumn (name = “QUESTION_ID”)
@org.hibernate.annotations.Cascade(
value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN
)
@org.hibernate.annotations.IndexColumn(name = “CHOICE_POSITION”)
private List choices = new ArrayList();

Choice

@ManyToOne
@JoinColumn (name=”QUESTION_ID”, nullable = false, updatable = false,
insertable = false)
private Question question;

the @org.hibernate.annotations.IndexColumn defines the colum CHOICE_POSITION
that will be used to maintain the order of the list.
-- 
View this message in context: http://www.nabble.com/Eclipse-link-equivalent-of-Projections-tp18925938p18925938.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top