feat: Add tutorial about the ORM system - #15468
Open
CarlSchwan wants to merge 2 commits into
Open
Conversation
Contributor
📖 Documentation Preview📄 2 changed documentation pagesLast updated: Thu, 20 Aug 2026 16:25:34 GMT |
Assisted-by: ClaudeCode:claude-sonnet-5 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
susnux
approved these changes
Aug 20, 2026
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
artonge
reviewed
Aug 21, 2026
|
|
||
| By default, as in the example above, a bare ``#[Id]`` relies on the database's autoincrement column: | ||
| ``insert()`` only fills in ``$author->id`` after the row has been written. Pass a ``generatorClass`` to | ||
| generate the id application-side, before the row is inserted, instead. ``OCP\Snowflake\ISnowflakeGenerator`` |
Contributor
There was a problem hiding this comment.
Shouldn't snowflakes be the first/default examle in the documentation? Assuming we rather want people to use snowflake.
| 1. Don't use table name longer than 23 characters. As Oracle is limited to 30 chars and we need 3 more for ``oc_`` at the beginning and 5 for the primary key suffix ``_pkey``. | ||
|
|
||
| 2. Add an auto-incremented ``id`` column. This will ease the use of ``QBMapper`` + ``Entity`` approach: | ||
| 2. Add an auto-incremented ``id`` column. This will ease the use of the ``Repository`` + attributes approach: |
Contributor
There was a problem hiding this comment.
Same comment as above, shouldn't we push for snowflake instead?
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.
Remove old stuff about QBMapper (but still link to the doc from NC34 about this) and replace with the new stuff about AppFramework/ORM
Requires nextcloud/server#63441 to be merged first as this mention the change from there
🖼️ Screenshots
✅ Checklist
codespellor similar and addressed any spelling issues