Question: you are given a spring boot version 2 y z You are given a springboot version 2 . 0 . 5 application with database access
you are given a spring boot versionYou are given a springboot version application with database access already configured. The database contains two tables person and pet
A person can have many pets and every pet has an owner.
Database schema
CREATE TABLE person
Id bigint not null,
Firstname varchar not null,
Primary key id
;
CREATE TABLE pet
Id bigint Not null,
name varchar not null,
Primary key id
;
Alter table pet
Add foreign key ownerid
References personid
Requirements
Register the person service as a spring bean.
Model the relay between Pet and Person by creating class fields. Add appropriate hibernate JPA annotations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
