ExerciseTreeParents all
This commit is contained in:
@@ -22,4 +22,13 @@ class ExerciseTreeParentsController (private val exerciseTreeParentsRepository:
|
||||
return if (list.isEmpty()) ResponseEntity.notFound().build() else
|
||||
ResponseEntity.ok().body(list)
|
||||
}
|
||||
|
||||
@GetMapping("/exercise_tree_parents")
|
||||
fun getAll(): ResponseEntity<List<ExerciseTreeParents>> {
|
||||
val list: List<ExerciseTreeParents> = exerciseTreeParentsRepository.findAll().orEmpty()
|
||||
|
||||
logger.info(" -- Get All Exercise Tree Parents by $list")
|
||||
return if (list.isEmpty()) ResponseEntity.notFound().build() else
|
||||
ResponseEntity.ok().body(list)
|
||||
}
|
||||
}
|
||||
@@ -22,9 +22,4 @@ data class ExerciseTree (
|
||||
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseTree")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
val translations: List<ExerciseTreeTranslation> = mutableListOf<ExerciseTreeTranslation>().toList()
|
||||
|
||||
/* @OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseTreeChild")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
var parents: List<ExerciseTreeParents> = mutableListOf<ExerciseTreeParents>().toList()*/
|
||||
|
||||
}
|
||||
@@ -11,12 +11,5 @@ data class ExerciseTreeParents (
|
||||
var exerciseTreeParentsId: Long = 0,
|
||||
@get: NotNull var exerciseTreeParentId: Long?,
|
||||
@get: NotNull var exerciseTreeChildId: Long?
|
||||
)/*{
|
||||
@ManyToOne(fetch = FetchType.EAGER, optional = false)
|
||||
@JoinColumn(name = "exerciseTreeChildId", nullable = false)
|
||||
@JsonIgnore
|
||||
val exerciseTreeChild: ExerciseTree? = null
|
||||
|
||||
}
|
||||
*/
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user