Changeset c3278ac for Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Category.java
- Timestamp:
- 03/09/23 16:11:48 (16 months ago)
- Branches:
- main
- Children:
- 0078d84, 4ab3aae
- Parents:
- 8b7dd7f (diff), 264d675 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- SazdovaEkaterina <74919977+SazdovaEkaterina@…> (03/09/23 16:11:48)
- git-committer:
- GitHub <noreply@…> (03/09/23 16:11:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Category.java
r8b7dd7f rc3278ac 3 3 import jakarta.persistence.*; 4 4 import lombok.Data; 5 import lombok.RequiredArgsConstructor; 6 7 import java.util.List; 5 8 6 9 @Data 7 10 @Entity 11 @RequiredArgsConstructor 8 12 @Table(name = "category") 9 13 public class Category { … … 17 21 private String name; 18 22 23 @ManyToMany 24 @JoinTable(name = "pet_belongs_to_category", 25 joinColumns = @JoinColumn(name = "id_category"), 26 inverseJoinColumns = @JoinColumn(name = "id_pet")) 27 List<Pet> pets; 28 19 29 public Category(String name) { 20 30 this.name = name; 21 31 } 22 32 23 public Category() {24 }25 33 }
Note:
See TracChangeset
for help on using the changeset viewer.