DEV Community

Bulbul Ahmed
Bulbul Ahmed

Posted on

How Can I achive this type of response pass the Data from DTO

User Class:: This is my user class that has only 2 properties

@Entity
@Data
@Table(name = "ACL_USERS")
public class User {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    private String name;

}

Book Entity

@Entity
@Data
@Table(name = "BOOKS")
public class Book {
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

Top comments (0)