-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BC-6870 - Create unified board persistence entity #4919
Conversation
d7f46df
to
d12bf40
Compare
apps/server/src/modules/board/poc/repo/entity/board-node.entity.ts
Outdated
Show resolved
Hide resolved
apps/server/src/shared/domain/entity/boardnode/rich-text-element-node.entity.ts
Outdated
Show resolved
Hide resolved
import { AnyBoardNode, AllBoardNodeProps } from '../../domain'; | ||
|
||
const PATH_SEPARATOR = ','; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be imported from src/modules/board/poc/domain/path-utils.ts
/* ExternalToolElement props */ | ||
// TODO migration and only store ids not the whole entity | ||
@Property({ nullable: true, fieldName: 'contextExternalToolId' }) | ||
contextExternalToolId?: ObjectId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use a "virtual property" like here like:
_contextExternalToolId?: ObjectId;
get contextExternalToolId(): EntityId | undefined {
return this._contextExternalToolId.toHextString();
}
set contextExternalToolId(id?: EntityId) {
this._contextExternalToolId = id ? new ObjectId(id) : undefined;
}
Maybe this could even be modeled later using a ContextTrait
with contextType
and contextId
similar to ColumnBoard
. So they could share the same trait.
cdef258
to
ca33b28
Compare
…d/schulcloud-server into BC-6870-board-persistence
Quality Gate failedFailed conditions |
Description
To make it easier to extend the board we want to implement a unified persistence entity for board nodes.
Currently we have implemented specific persistence entity classes for each board node type (Inheritance Mapping). That is not necessary because:
The mapping domain objects ist currently implemented as a builder using the visitor pattern which requires specific mapping code for each board node type.
We should remove this unnecessary complexity.
Links to Tickets or other pull requests
BC-6870
Changes
Datasecurity
Deployment
New Repos, NPM pakages or vendor scripts
Approval for review
generate-client:server
was executed in vue frontend and changes were tested and put in a PR with the same branch name.