apache / apache/grails-core

Allow "Table Per Heirarchy" for Persistence, (please)

Open
#14,411 1 comment 0 reactions 0 assignees View on GitHub
relates-to: grails-data-mongodb
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

Please allow the ability to use OO Inheritance in Grails domain classes that produce individual Collections in MongoDB per Child Class.

--------
Example Current:
BaseClass -> property1, property2

SubClass -> property3, property4

Expression in MongoDB is:
BaseClass Collection -> class:SubClass, property1, property2, property3(nullable: true), property4(nullable: true)

--------
Preferred Expression In MongoDB:

SubClass Collection -> property1, property2, property3, property4

** This allows us to use OO in Grails domain classes without repercussions in the persistent tier, among other benefits.

THANK YOU for the plugin and for your consideration.

Contributor guide

Open the contributing guide

Research direction

The issue names Grails domain classes and MongoDB but no files, tests, or entry points. Begin by locating the persistence mapping for inherited Grails domain classes and compare the current shared-collection behavior with the requested per-child collections; done means child classes persist to separate collections while retaining inherited properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, mongodb
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.