apache / apache/grails-core

GPMONGODB-57: Provide a constraint that helps in constraining the depth of a self join

Open
#14,416 0 comments 0 reactions 1 assignee Claimed by @graemerocher View on GitHub
relates-to: grails-data-mongodb type: enhancement type: minor
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

Original Reporter: bond
Environment: Not Specified
Version: 1.0.0.M7
Migrated From: http://jira.grails.org/browse/GPMONGODB-57

Suppose there is

{noformat}
class Organisation{
static hasMany={organisations:Organisation}

static constraints = {
organisations range:1..2
}
}
{noformat}

The above declaration allows 2 Organisation objects to be created under every other Organisation. If possible could you please provide a constraint using which we can restrict this depth. For example, a Organisation should have only two children and no more children of children should be possible.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.