Skip to content

.3493622109966576:7bf0f9086f5e11b4b0538f6fc24bb8be_69e4bb4a051b5b827f44d5c7.69e4bcdd051b5b827f44d62f.69e4bcddc46d8002eb6124dc:Trae CN.T(2026/4/19 19:30:37)#2366

Open
zilvya wants to merge 1 commit intospring-projects:mainfrom
zilvya:task1
Open

.3493622109966576:7bf0f9086f5e11b4b0538f6fc24bb8be_69e4bb4a051b5b827f44d5c7.69e4bcdd051b5b827f44d62f.69e4bcddc46d8002eb6124dc:Trae CN.T(2026/4/19 19:30:37)#2366
zilvya wants to merge 1 commit intospring-projects:mainfrom
zilvya:task1

Conversation

@zilvya
Copy link
Copy Markdown

@zilvya zilvya commented Apr 19, 2026

实现宠物疫苗记录管理功能,包括:

  • 新增Vaccine实体类及相关字段
  • 在Pet类中添加疫苗集合及相关操作方法
  • 添加VaccineRepository接口
  • 实现VaccineController处理疫苗记录添加逻辑

实现宠物疫苗记录管理功能,包括:
- 新增Vaccine实体类及相关字段
- 在Pet类中添加疫苗集合及相关操作方法
- 添加VaccineRepository接口
- 实现VaccineController处理疫苗记录添加逻辑
@OrderBy("date ASC")
private final Set<Visit> visits = new LinkedHashSet<>();

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you change to EAGER fetch loading?

/**
* Simple JavaBean domain object representing a vaccine record.
*
* @author Spring PetClinic
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need author?
Is it in git, so just can use git blame.

}

public String getName() {
return this.name;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not to use Lombok?


private final OwnerRepository owners;

public VaccineController(OwnerRepository owners) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use Lombok

Copy link
Copy Markdown
Contributor

@andrzejsydor andrzejsydor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants