nerdexam
Oracle

1Z0-898 · Question #58

Consider the following web application: Here MyEntity1.class and MyEntity2.class are annotated with @Entity and MyEmbeddable1- class and MyEmbeddable2-class are annotated with @Embeddable. MyPU is…

The correct answer is A. MyEntity1, and MyEmbeddable1. Persistence unit The set of entity types that can be managed by a given entity manager is defined by a persistence unit. A persistence unit defines the set of all classes that are related or grouped by the application, and which must be collocated in their mapping to a single…

JPA Fundamentals

Question

Consider the following web application:

Here MyEntity1.class and MyEntity2.class are annotated with @Entity and MyEmbeddable1- class and MyEmbeddable2-class are annotated with @Embeddable. MyPU is container managed. Which of the following represents set of classes considered managed by MyPU?

Exhibit

1Z0-898 question #58 exhibit

Options

  • AMyEntity1, and MyEmbeddable1
  • BMyEntity1, MyEmbeddable1, MyEntity2, and MyEmbeddable2
  • CMyEntity1, MyEmbeddable1, and MyEntity2
  • DMyEntity1 and MyEntity2

How the community answered

(27 responses)
  • A
    74% (20)
  • B
    4% (1)
  • C
    7% (2)
  • D
    15% (4)

Explanation

Persistence unit The set of entity types that can be managed by a given entity manager is defined by a persistence unit. A persistence unit defines the set of all classes that are related or grouped by the application, and which must be collocated in their mapping to a single data store.

Topics

#persistence unit scope#managed classes#@Entity#@Embeddable

Community Discussion

No community discussion yet for this question.

Full 1Z0-898 Practice