Skip to content

Commit 4d9415f

Browse files
committedJul 2, 2024
Add relatedScores property to Score entity AtlasOfLivingAustralia/fieldcapture#3170
1 parent 427d94c commit 4d9415f

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed
 

‎grails-app/conf/application.groovy

+5-1
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,11 @@ environments {
631631
app.uploads.url = "/document/download/"
632632
grails.mail.host="localhost"
633633
grails.mail.port=1025
634-
634+
grails.cache.ehcache = {
635+
diskStore {
636+
path "~/data/${appName}/ehcache"
637+
}
638+
}
635639

636640
}
637641
test {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package au.org.ala.ecodata
2+
3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
4+
import groovy.transform.EqualsAndHashCode
5+
import groovy.transform.ToString
6+
7+
8+
@EqualsAndHashCode
9+
@ToString
10+
@JsonIgnoreProperties(['metaClass', 'errors', 'expandoMetaClass'])
11+
class RelatedScore {
12+
13+
String scoreId
14+
15+
/** A description of the association - e.g. Service Provider, Grantee, Sponsor */
16+
String description
17+
18+
}

‎grails-app/domain/au/org/ala/ecodata/Score.groovy

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class Score {
3737
/** Can be used to categorize scores */
3838
List<String> tags
3939

40+
List<RelatedScore> relatedScores
41+
4042

4143
/** Embedded document describing how the score should be calculated */
4244
Map configuration
@@ -59,6 +61,8 @@ class Score {
5961
version false
6062
}
6163

64+
static embedded = ['relatedScores']
65+
6266
def beforeValidate() {
6367
if (scoreId == null) {
6468
scoreId = Identifiers.getNew(true, "")

0 commit comments

Comments
 (0)
Please sign in to comment.