why do i need getter for my entity class?

hey guys. can smb help me out? if i remove getters for my entity class fields, in postman i get this:
[
{},
{},
{},
{}
]
[
{},
{},
{},
{}
]
this is my entity class:
@Getter
@Entity
@Table(name = "items")
public class Item {
@Id @GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
private String season;
private double distance;
}
@Getter
@Entity
@Table(name = "items")
public class Item {
@Id @GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
private String season;
private double distance;
}
can smb help me out? thanks
2 Replies
JavaBot
JavaBot14mo ago
This post has been reserved for your question.
Hey @bambyzas! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
JavaBot
JavaBot14mo ago
Post Closed
This post has been closed by <@611623200756989972>.

Did you find this page helpful?