Merge branch 'dev' into Vincent
OK
This commit is contained in:
commit
d88b34c774
5
.gitignore
vendored
5
.gitignore
vendored
@ -5,6 +5,9 @@ build/
|
|||||||
!**/src/main/**/build/
|
!**/src/main/**/build/
|
||||||
!**/src/test/**/build/
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
application.properties
|
||||||
|
|
||||||
|
|
||||||
### STS ###
|
### STS ###
|
||||||
.apt_generated
|
.apt_generated
|
||||||
.classpath
|
.classpath
|
||||||
@ -35,5 +38,3 @@ out/
|
|||||||
|
|
||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
application.properties
|
|
||||||
|
@ -17,6 +17,7 @@ dependencies {
|
|||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
runtimeOnly 'mysql:mysql-connector-java'
|
runtimeOnly 'mysql:mysql-connector-java'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
@ -144,7 +144,6 @@ public class Restaurant {
|
|||||||
@JoinTable(name="type_restau",
|
@JoinTable(name="type_restau",
|
||||||
joinColumns = @JoinColumn(name = "id_restau"/*classe en cours*/,referencedColumnName = "id_restau" /*classe reliée*/) ,
|
joinColumns = @JoinColumn(name = "id_restau"/*classe en cours*/,referencedColumnName = "id_restau" /*classe reliée*/) ,
|
||||||
inverseJoinColumns = @JoinColumn(name = "id_type",referencedColumnName = "id_type"))
|
inverseJoinColumns = @JoinColumn(name = "id_type",referencedColumnName = "id_type"))
|
||||||
@JsonBackReference("typerestaus")
|
|
||||||
public Collection<TypeRestau> getTyperestaus() {
|
public Collection<TypeRestau> getTyperestaus() {
|
||||||
return typerestaus;
|
return typerestaus;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import javax.persistence.Id;
|
|||||||
import javax.persistence.ManyToMany;
|
import javax.persistence.ManyToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +50,7 @@ public class TypeRestau {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ManyToMany(mappedBy="typerestaus")
|
@ManyToMany(mappedBy="typerestaus")
|
||||||
@JsonIgnoreProperties("typerestaus")
|
@JsonBackReference("restaurants")
|
||||||
public List<Restaurant> getRestaurants() {
|
public List<Restaurant> getRestaurants() {
|
||||||
return restaurants;
|
return restaurants;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user