skip to Main Content

java.lang.NullPointerException: Cannot invoke "com.proj.my.repository.OrderRepository.save(Object)" because "this.orderRepository" is null – Mysql

I want to test my orderService, each order has x cartItems, each cartItem is a product. I managed to do some code, and thought I got it right, but encountered a problem : java.lang.NullPointerException: Cannot invoke "com.proj.my.repository.OrderRepository.save(Object)" because "this.orderRepository" is…

VIEW QUESTION

Entity not creating table in DB – Postgresql

I'm using Spring boot, and I Run this model. package com.example.demo.Models; import jakarta.persistence.*; @Entity @Table(name = "user") public class UserModel { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(unique = true, nullable = true) private Long id; private String name; private String email;…

VIEW QUESTION
Back To Top
Search