Question: How do I create an account entity in Spring boot from an h2 database that allows users to have four types of accounts but it

How do I create an account entity in Spring boot from an h2 database that allows users to have four types of accounts but it queries and shows up using thyme leaf under one user?

SO....

User ----> account (checking, savings, loan, credit card) this will be the different accounts they can have so I need to know how to combine the User.java and the Account.java

User will have

users

id: 1 first_name: John last_name: Doe email: jdoe@example.com password: test123

--------------------------------------------------------------

and accounts will have

accounts

id: 1 user_id: 1 name: checking

name: checking

account_type: 1

and account types will have

account_types

Id:1 type_name: checking

Id:2

type_name: savings

id: 3

type_name: loan

id: 4

type_name: credit card

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!