Fixed error when adding ingredient
This commit is contained in:
parent
624a0cbe86
commit
f048e0fe3e
2 changed files with 9 additions and 6 deletions
|
|
@ -20,13 +20,12 @@ public class Ingredient {
|
|||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
public long id;
|
||||
public Long id;
|
||||
|
||||
// FIXME Dec 22 2025::temporarily made this not a unique constraint because of weird JPA behaviour
|
||||
@Column(name = "name", nullable = false, unique = false)
|
||||
public String name;
|
||||
|
||||
|
||||
@Column(name = "protein", nullable = false)
|
||||
public double proteinPer100g;
|
||||
|
||||
|
|
@ -70,7 +69,7 @@ public class Ingredient {
|
|||
+ fatPer100g * KCAL_PER_GRAM_FAT;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +85,7 @@ public class Ingredient {
|
|||
return carbsPer100g;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue