1.
Consider a persistence application with the following orm.xml:
What will be the effect of the above orm.xml?
2.
An application uses an application-managed entity manager. Which of the following is NOT true?
3.
An application that uses container-managed transaction demarcation creates a query within an active transaction and receives a QueryTimeoutException. Which of
those scenarios describes what happens to the active transaction?
4.
The developer has defined the following entity class office:
@Entity
public class Office {
@Id
private int id;
private String name;
@OneToMany

private List
}
rooms;
Which of the following attributes will be in corresponding generated static metamodel class for the rooms' field?
5.
Given two entities with many-to-many bidirectional association between them:
@Entity public class Employee {
Collection projects;
// more code here
}
and
@Entity public class Project {
Set
}
// more code here
emps;
What set of annotations correctly defines the association?
6.
An application wants to utilize side effects of cascading entity manager operations to related entities.
Which statement is correct?
7.
An entity person is mapped to a table PERSON and has a collection-valued persistence field otherUsedNames that stores names used by a person. The
otherUsedNames field is mapped to a separate table called NAMES. Which code fragment correctly defines such field?
8.
Which statement is true about the @OrderColumn annotation?
9.
Which cascade option can be specified in a mapping descriptor so that it applies to all relationships in a persistent e unit?
10.
The developer wants to define a unidirectional relationship from the customer entity to the order entity and map this relationship using a foreign key mapping
strategy. Which one of the pairs of classes below correctly achieves this task?