Thymeleaf form not saving data to database for nested objects in Spring Boot

I don’t understand why the entered data from the html template is not saved in the database.

I have an entity Supplies:

@Getter
@Setter
@Builder
@AllArgsConstructor
@Entity(name = "supplies")
public class Supplies {

    public Supplies() {
        this.badges = new ArrayList<>();
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @OneToMany(mappedBy = "sup", cascade = CascadeType.ALL, orphanRemoval = true)
    private List<Badge> badges;

    @OneToOne
    @JoinColumn(name = "header_id", nullable = false)
    private InputHeader header;
}

and entity Badge:

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PUBLIC)
@Entity(name = "badges")
public class Badge {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String badgeMaterial; //материал изготовления - тут всего два варианта ПЕЧАТНЫЙ ПЛАСТИКОВЫЙ
    private String size; //размер - варианты для списка или вписываем вручную(можно оставлять пустым)
    private String chroma; //цветность - варианты для списка или вписываем вручную(можно оставлять пустым)
    private String density; //плотность - варианты для списка или вписываем вручную(можно оставлять пустым)
    private String lamination; //показател ламинации - варианты для списка или вписываем вручную(можно оставлять пустым)
    private String laminationKind; //тип ламинации - тут всего два варианта МАТОВЫЙ ГЛЯНЦЕВЫЙ

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "supplies_id", nullable = false)
    private Supplies sup;
}

Look at my HTML template:

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Input Supplies</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
</head>
<body>
<div class="container">
    <h1>Input Supplies</h1>
    <form th:action="@{/input/saveSupplies}" th:object="${supplies}" method="post">
        <input type="hidden" name="headerId" th:value="${headerId}" />
        <input type="hidden" name="suppliesId" th:value="${suppliesId}" />

        <div class="badge-fields">
            <h2>Badge 1</h2>
            <div class="form-group">
                <label>Badge Material</label>
                <select th:field="*{badges[0].badgeMaterial}" class="form-control">
                    <option value="" selected> -- Select Material -- </option>
                    <option value="PRINTED">Printed</option>
                    <option value="PLASTIC">Plastic</option>
                </select>
            </div>
            <div class="form-group">
                <label>Size</label>
                <input type="text" th:field="*{badges[0].size}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Chroma</label>
                <input type="text" th:field="*{badges[0].chroma}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Density</label>
                <input type="text" th:field="*{badges[0].density}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Lamination</label>
                <input type="text" th:field="*{badges[0].lamination}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Lamination Kind</label>
                <select th:field="*{badges[0].laminationKind}" class="form-control">
                    <option value="" selected> -- Select Lamination Kind -- </option>
                    <option value="MATTE">Matte</option>
                    <option value="GLOSSY">Glossy</option>
                </select>
            </div>
        </div>

        <div id="badge2Fields" class="badge-fields">
            <h2>Badge 2</h2>
            <div class="form-group">
                <label>Badge Material</label>
                <select th:field="*{badges[1].badgeMaterial}" class="form-control">
                    <option value="" selected> -- Select Material -- </option>
                    <option value="PRINTED">Printed</option>
                    <option value="PLASTIC">Plastic</option>
                </select>
            </div>
            <div class="form-group">
                <label>Size</label>
                <input type="text" th:field="*{badges[1].size}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Chroma</label>
                <input type="text" th:field="*{badges[1].chroma}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Density</label>
                <input type="text" th:field="*{badges[1].density}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Lamination</label>
                <input type="text" th:field="*{badges[1].lamination}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Lamination Kind</label>
                <select th:field="*{badges[1].laminationKind}" class="form-control">
                    <option value="" selected> -- Select Lamination Kind -- </option>
                    <option value="MATTE">Matte</option>
                    <option value="GLOSSY">Glossy</option>
                </select>
            </div>
        </div>

        <button type="submit" class="btn btn-primary">Save</button>
    </form>
</div>
</body>
</html>

in my GetMapping endpoint i create all entities

@GetMapping("/input/supplies")
    public String showInputSupplies(@RequestParam("headerId") Long headerId, Model model) {
        Supplies supplies = new Supplies();
        supplies.setHeader(inputService.getInputHeaderById(headerId));
        inputService.saveInputSupplies(supplies);


        Long suppliesId = supplies.getId();

        System.out.println(supplies);
        System.out.println(headerId);
        System.out.println(suppliesId);
        Badge badge1 = new Badge();
        Badge badge2 = new Badge();
        badge1.setSup(inputService.getSuppliesById(suppliesId));
        badge2.setSup(inputService.getSuppliesById(suppliesId));

        supplies.getBadges().add(badge1);
        supplies.getBadges().add(badge2);

        inputService.saveBadge(badge1);
        inputService.saveBadge(badge2);
        model.addAttribute("suppliesId", suppliesId);
        model.addAttribute("supplies", supplies);
//        model.addAttribute("badge1", new Badge());
//        model.addAttribute("badge2", new Badge());
        model.addAttribute("badge1", badge1);
        model.addAttribute("badge2", badge2);
        model.addAttribute("headerId", headerId);
        return "inputSupplies";
    }

I check in the database and see that I have a Supplies instance created with the generated ID, the HeaderID is correctly linked, two Badge instances are also created, also with the generated IDs and the correct binding to Supplies. Next, I go to my template, fill it with data and save it, after which I am redirected to return from PostMapping.

    @PostMapping("/input/saveSupplies")
    public String saveSupplies(@RequestParam("headerId") Long headerId,
                               @ModelAttribute Supplies supplies,
                               @ModelAttribute("badge1") Badge badge1,
                               @ModelAttribute("badge2") Badge badge2,
                               @RequestParam("suppliesId") Long suppliesId,
                               Model model) {

        model.addAttribute("message", "Supplies and Badges saved successfully");
        return "redirect:/staff?headerId=" + headerId;
    }

but in the database, all filled fields remain null. What am I doing wrong?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật