nerdexam
Oracle

1Z0-898 · Question #52

Which two of the following statements are true of embeddable classes? (Choose two)

The correct answer is B. Null comparison operations over embeddable classes are not supported in the Java Persistence D. An embeddable class can be the key of a Map relationship. Not A: Embeddable classes may themselves use other embeddable classes to represent their state.They may also contain collections of basic Java programming language types or other embeddable classes. Not C: Embeddable classes may also contain relationships to other entities or…

JPA Fundamentals

Question

Which two of the following statements are true of embeddable classes? (Choose two)

Options

  • AAn embeddable class must not be used to represent the state of another embeddable class.
  • BNull comparison operations over embeddable classes are not supported in the Java Persistence
  • CAn embeddable class must not contain a relationship to an entity.
  • DAn embeddable class can be the key of a Map relationship.

How the community answered

(54 responses)
  • A
    6% (3)
  • B
    81% (44)
  • C
    13% (7)

Explanation

Not A: Embeddable classes may themselves use other embeddable classes to represent their state.They may also contain collections of basic Java programming language types or other embeddable classes. Not C: Embeddable classes may also contain relationships to other entities or collections of entities. If the embeddable class has such a relationship, the relationship is from the target entity or collection of entities to the entity that owns the embeddable class. Note: Embeddable classes are used to represent the state of an entity but don't have a persistent identity of their own, unlike entity classes. Instances of an embeddable class share the identity of the entity that owns it. Embeddable classes exist only as the state of another entity. An entity may have single-valued or collection-valued embeddable class attributes.

Topics

#@Embeddable#embeddable class#Map key#null comparison

Community Discussion

No community discussion yet for this question.

Full 1Z0-898 Practice