CSE MCQs :: JPA
- What are the JPA @Entity association attributes?
- ________ has stated that ideas came from several frameworks, including Hibernate and JDO.
- What is the Life Cycle Of A Jpa Entity?
-
What's true about the following @Entity association between House and Window?@Entitypublic class Window {@Idprivate int winNo;@ManyToOneprivate House aHouse;}@Entitypublic class House {@Idprivate int houseNo;@OneToMany(mappedBy="aHouse")private List
windows; } - Which annotation is used to create Pk-Fk relation b/w two tables?
- Object/relational metadata can be specified directly in the entity class file by using annotations, or in a separate ________ descriptor file distributed with the application.
- What is TRUE about the cascading and cascade mode attributes in Entity Beans?
- Which attribute of @OneToMany is used to mark an entity as owned?
- What is the JPA equivalent of hibernate.cfg.xml file?
A.
Cascade mode attributes can be specified for the association annotaions (like @OneToMany) in an entity bean
|
B.
The cascading direction is from the target entity to the source entity
|
C.
PERSIST, DELETE and REFRESH are cascading mode attributes
|
D.
Refresh cascade causes to refresh the target entities of a relationship when refresh is invoked on the source entity of the relationship
|