diff --git a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt index 12b009b..b7f73fb 100644 --- a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt +++ b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt @@ -43,9 +43,11 @@ data class Tutor( @GeneratedValue(strategy = GenerationType.IDENTITY) val id: Long = 0, val name: String, + @JsonIgnore @ManyToOne(fetch = FetchType.LAZY) val site: Site ) { + @JsonIgnore @ManyToMany @JoinTable(name = "tutor_observations", joinColumns = [JoinColumn(name = " tutor_id", referencedColumnName = "id")], @@ -91,7 +93,6 @@ data class Observation( val knowledge: Double?, @ElementCollection val entries: List, - @JsonIgnore @ManyToMany(mappedBy = "observations") val tutors: Set, @ManyToMany diff --git a/frontend/src/views/ViewObservations.vue b/frontend/src/views/ViewObservations.vue index 51150b5..2790c31 100644 --- a/frontend/src/views/ViewObservations.vue +++ b/frontend/src/views/ViewObservations.vue @@ -59,7 +59,10 @@

{{ observation.date }}
{{ observation.whom }} {{ observation.type }}
{{ observation.observed }}

{{ observation.date }}, {{ observation.whom }}
{{ observation.type }}, {{ observation.observed }}

-

{{ person.name }}

+

Observed by: {{ tutor.name }}

+
+ +

Participants: {{ person.name }}