API 1.0.18 ExerciseTreeParents with controller
This commit is contained in:
@@ -18,14 +18,13 @@ data class ExerciseTree (
|
||||
@get: NotBlank var imageUrl: String = "",
|
||||
@get: NonNull var active: Boolean?
|
||||
|
||||
|
||||
) {
|
||||
@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")
|
||||
/* @OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseTreeChild")
|
||||
@Fetch(value = FetchMode.SUBSELECT)
|
||||
val parents: List<ExerciseTreeParents> = mutableListOf<ExerciseTreeParents>().toList()
|
||||
var parents: List<ExerciseTreeParents> = mutableListOf<ExerciseTreeParents>().toList()*/
|
||||
|
||||
}
|
||||
@@ -9,13 +9,14 @@ data class ExerciseTreeParents (
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var exerciseTreeParentsId: Long = 0,
|
||||
@get: NotNull var exerciseTreeParentId: Long?
|
||||
) {
|
||||
@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