Which two mapping options can be chosen?

A developer is creating an entity which is mapped to a table that has a primary key constraint
defined on two character columns and would like to use mapping defaults as much as possible to
simplify the code. Which two mapping options can be chosen? (Choose two.)

A developer is creating an entity which is mapped to a table that has a primary key constraint
defined on two character columns and would like to use mapping defaults as much as possible to
simplify the code. Which two mapping options can be chosen? (Choose two.)

A.
Use an @ld property that constructs a private field as a concatenation of two columns.

B.
Use a separate class to map those two columns and use an @ldClass annotation to denote the
primary key field or property in the entity.

C.
Use a separate @Embeddable class to map those two columns and use an @Embeddedld
annotation to denote a single primary key field or property in the entity.

D.
Use a separate @Embeddable class to map those two columns and add two fields or
properties to the entity, each marked as @ld, that correspond to the fields or properties in the
embeddable class.

E.
Use a separate class to map those two columns. Specify that class using @ldClass annotation
on the entity class. Add two fields or properties to the entity, each marked as @ld, that correspond
to the fields or properties in that separate class.



Leave a Reply 0

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