I have problems with Many to One relationship because I don't show correctly the entity.
Could anyone helps to me ?
I attached my code.
Invoice
@Entity
@Table(name = "invoices")
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,property = "id")
public class Invoice {
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    private String clave;
    @OneToMany(mappedBy = "invoice", cascade = CascadeType.REMOVE, fetch = FetchType.LAZY, orphanRemoval = true)
    private List<InvoiceLine> lines;
InvoiceLines
@Entity
@Table(name = "invoice_lines")
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,property = "id")
public class InvoiceLine {
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @Column(name = "product", nullable = false)
    private String product;
    @ManyToOne
    @JoinColumn(name = "invoice_id", referencedColumnName = "id", nullable = false)
    private Invoice invoice;
Controller
@RestController
public class InvoiceController{
    @Autowired
    private InvoiceRepository invoiceRepository;
    @Autowired
    private InvoiceLineRepository invoiceLineRepository;
    @GetMapping("/")
    public Iterable<Invoice> findAllnvoices(){
        return invoiceRepository.findAll();
    }
    @GetMapping("/invoiceLine")
    public Iterable<InvoiceLine> findAllInvoiceLine(){
        return invoiceLineRepository.findAll();
    }
    @GetMapping("/{id}")
    public Optional<Invoice> findTagByInvoice(@PathVariable("id") Long id){
        return invoiceRepository.findById(id);
    }
}
The response when I call a endpoint invoiceLine :
[
    {
        "id": 1,
        "product": "Tag1-ES",
        "invoice": {
            "id": 1,
            "clave": "Tag1",
            "lines": [
                1,
                {
                    "id": 2,
                    "product": "Tag1-FR",
                    "invoice": 1
                },
                {
                    "id": 3,
                    "product": "Tag1-IT",
                    "invoice": 1
                }
            ]
        }
    },
    2,
    3
]
My question :Why is not showing correctly the response the ManyToOne entity if I have all correct ?