Move Configuration DAO to Mongoose - #83
Open
AustinSMueller wants to merge 2 commits into
Open
Conversation
#273 Bundle Size — 12.87MiB (+100%).Warning Bundle contains 54 duplicate packages – View duplicate packages Bundle metrics
|
| Current #273 |
Baseline | |
|---|---|---|
877.16KiB |
- |
|
0B |
- |
|
0% |
- |
|
74 |
- |
|
117 |
- |
|
9159 |
- |
|
0 |
- |
|
0% |
- |
|
320 |
- |
|
53 |
- |
Bundle size by type no changes
| Current #273 |
Baseline | |
|---|---|---|
10.35MiB (+100%) |
- | |
1.72MiB (+100%) |
- | |
805.07KiB (+100%) |
- | |
18KiB (+100%) |
- |
Bundle analysis report Branch mongoose-configuration Project dashboard
Generated by RelativeCI Documentation Report issue
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates configuration data access from the Prisma-backed DAO to a Mongoose-backed DAO, updating service logic and tests to support Mongo-style _id fields while keeping Prisma-style id compatibility for consumers.
Changes:
- Replace Prisma-based
ConfigurationDAO/ OMB configuration lookup with Mongoose model +MongooseGenericDAOinheritance. - Add a Mongoose
Configurationmodel (including PBAC Defaults nested schemas) for configuration documents. - Add/adjust unit tests to validate ID normalization behavior and updated DAO wiring.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/backend/services/configurationService.js | Updates PBAC nested permission/notification ID normalization to support _id-based Mongoose documents. |
| apps/backend/dao/configuration.js | Switches configuration DAO implementation to extend MongooseGenericDAO using the new Configuration model. |
| apps/backend/dao/omb.js | Replaces direct Prisma access with ConfigurationDAO.findByType(OMB_INFO). |
| apps/backend/mongoose/models/configuration.js | Adds a Mongoose schema/model for configuration documents, including PBAC Defaults nested structures. |
| apps/backend/test/dao/dao.configuration.test.js | Updates DAO tests to mock Mongoose model methods and validate normalized id/_id. |
| apps/backend/test/dao/dao.omb.test.js | Updates OMB DAO tests to mock ConfigurationDAO instead of Prisma. |
| apps/backend/test/services/configurationService.getPBACByRoles.test.js | Adds coverage for PBAC nested ID normalization for both _id and id shapes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AustinSMueller
marked this pull request as ready for review
July 23, 2026 20:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate Configuration DAO from Prisma to Mongoose