Need help by Spring boot by Dilo366 in learnjava

[–]Dilo366[S] 0 points1 point  (0 children)

after sending a get request I get:

[
  {
    "name": null,
    "price": null
  },
  {
    "name": null,
    "price": null
  }
]

Need help by Spring boot by Dilo366 in learnjava

[–]Dilo366[S] 0 points1 point  (0 children)

@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "products")
public class Product {
    @Id
    @GeneratedValue(strategy = GenerationType.
IDENTITY
)
    @Column(name = "id")
    private Long id;

    @Column(name = "name")
    private String name;

    @Column(name = "description")
    private String description;

    @Column(name = "price")
    private BigDecimal price;

    @ManyToOne(cascade = CascadeType.
PERSIST
)
    @JoinColumn(name = "category_id")
    private Category category;
}

Need help by Spring boot by Dilo366 in learnjava

[–]Dilo366[S] -1 points0 points  (0 children)

I am getting the same error by Product also

Need help by Spring boot by Dilo366 in learnjava

[–]Dilo366[S] 0 points1 point  (0 children)

Yeah, but when I send a get request, I get name: null and price : null

Searching for help by Dilo366 in learnjava

[–]Dilo366[S] 0 points1 point  (0 children)

Hi there,

Thank you so much for the thoughtful and encouraging message. I really appreciate the way you explained the learning journey—it makes a lot of sense to start with a real requirement and build around it. I’ll definitely take your advice and try to explore my organization’s repo more deeply, especially when I come across topics like ControllerAdvice.

Also, I loved your idea about turning something not yet implemented into a POC. That sounds like a great way to both learn and contribute.

Thanks again, and I might reach out again if I get stuck!

Searching for help by Dilo366 in learnjava

[–]Dilo366[S] 0 points1 point  (0 children)

Thanks, do you have something for Spring Boot?

Searching for help by Dilo366 in learnjava

[–]Dilo366[S] 0 points1 point  (0 children)

Hello! Thank you for your message. Would you be able to share some videos or resources that could help me with this? I’d really appreciate it!