Skip to content

jpfigueredo/Web-Ecommerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web-Ecommerce

Springboot Web Application

The main goal of the project is to reproduce a Database for a Ecommerce Web Application;
We have a Category-Product relation, so that One category can have Many Products (1:N);
Some concepts are studied, like Persistence in memory (JPA), H2 database, Dependency injection, Serializable, Domain Drive Design, Object Oriented Programming, HTTP knowledge...

The relationship is first set when the dependencies are imported as seen below.

image

Secondly, to manipulate Jpa and H2, use the notations

image

//  As it is shown, Id notation says that the atribute is of type Id and @GeneratedValue(strategy = GenerationType.IDENTITY) autoincrements it
  @Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)

Once it is stablished in one side, it has to be on the other, like this.

image

Note that one notation is @OneToMany and the other is @ManyToOne, defining who is 1 and who is N at a 1:N relation

Loading...

About

Backend Springboot Web Application, model based on a common ecommerce

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages