Datamodel: Annotations are stored wrong
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.knownfile - 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!
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
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.