Quantcast
Channel: JPA use Map instead of List - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Hadi Jeddizahed for JPA use Map instead of List

I think you can use List and for delete option use removeIf() method. also it's better use Set to avoid duplicate option as @JB Nizet said....

View Article



JPA use Map instead of List

I am using Spring JPA to design an e-commerce application. Suppose I have 2 classes Product and Option with one-to-many relationship, i.e. a Product will have many Option and an Option belongs to only...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images