Which statement is true about the @OrderColumn annotation?

Which statement is true about the @OrderColumn annotation?

Which statement is true about the @OrderColumn annotation?

A.
If mime is not specified, it defaults to the foreign key column.

B.
The OrderColumn annotation may be specified only on a relationship.

C.
The OrderColumn annotation is always specified on the owning side of a relationship.

D.
The order column is not visible as part of the state of the entity.

Explanation:
http://www.eclipse.org/eclipselink/api/2.0/javax/persistence/OrderColumn.html(second paragraph)



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Tommy_Croatia_ZGB

Tommy_Croatia_ZGB

Correct answer is D.

http://docs.oracle.com/javaee/6/api/javax/persistence/OrderColumn.html

The OrderColumn annotation is specified on a OneToMany or ManyToMany relationship or on an element collection. The OrderColumn annotation is specified on the side of the relationship that references the collection that is to be ordered. The order column is not visible as part of the state of the entity or embeddable class.