Skip to content
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

Datamodel: Annotations are stored wrong #2461

Open
3 tasks
mapkyca opened this issue Jun 16, 2019 · 2 comments
Open
3 tasks

Datamodel: Annotations are stored wrong #2461

mapkyca opened this issue Jun 16, 2019 · 2 comments

Comments

@mapkyca
Copy link
Member

mapkyca commented Jun 16, 2019

While trying to do this:

List, edit, delete or otherwise manage annotations and comments

I encountered this error:

It's not really possible, as annotations are stored directly on the object

Some other notes:

The current data model is very heavily influenced by the fact it was originally stored in mongo only. Storing annotations on the actual object is utterly crazy when you're in a relational world.

Redesign the data model to store annotations in its own table.

  • Annotations to have its own relational table
  • Object methods to address this for SQL stores
  • Migration script for existing annotations

Give us some context:

  • It'd also be really handy if you could tell us the contents of your version.known file
  • What database are you using? (e.g. mongo, mysql, postgres)
  • Any warnings or errors in your admin/diagnostics page?
  • If this is a programming bug, can you include examples of any Micropub / API calls / webhook pings you make? Otherwise please don't worry about what this means!
  • Bonus points - are you able to illustrate the issue with a unit test? If so, submit it as a pull request!
@mediaformat
Copy link
Contributor

Storing annotations on the actual object...

I'm encountering this very issue while trying to fetch individual reply annotations, the whole object is returned...
#3186

@mediaformat
Copy link
Contributor

While we are refactoring relations between tables, I would also make annotations have a relation to their (remote) user entity.

This will ensure remote user info such as owner_name & owner_image are always current, for example.

@mediaformat mediaformat mentioned this issue Apr 6, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants