Media tracking prototype#6843
Conversation
…operty editors and relation service into the base content repositories
… returned reference but have discovered a gotcha for relations, so next step is to resolve that.
…ation to return the actual object types for the ID references, now relations can be more flexible without being strangely tied to specific object types based on the relation type.
…tions without object types, fixes migration
| private Guid? _childObjectType; | ||
|
|
||
| public RelationType(Guid childObjectType, Guid parentObjectType, string alias) | ||
| //TODO: Should we put back the broken ctors with obsolete attributes? |
There was a problem hiding this comment.
Good question.. I think we need to have an overview of the total amount of breaking changes before we can decide..
| ClearEntityTags(entity, _tagRepository); | ||
| } | ||
|
|
||
| PersistRelations(entity); |
There was a problem hiding this comment.
I'm in doubt about whether this should be here or in a event.. Is this consistent with the rest of the code base?
There was a problem hiding this comment.
I don't think we should be using an event at all since we aren't doing that anywhere else with the repositories in the code base. I've decided to explicitly call this base method from each inherited repository just to make it explicit, however, we could easily add this to the base classes methods of PersistUpdatedItem and PersistNewItem to have this automatically taken care of. I just thought for now to make it explicit but we can change if we like.

This is still part of a larger work in progress for media (and other entity) tracking.
Changes in this PR (work will continue in another branch):
Guidis nowGuid?for parent/child object types on IRelationType and the RelationType ctor has been updated to be useful, it was not really working beforeRelationFactory, all mappings are just staticTesting
Only the RTE has been updated to return references right now, so you can have any content item with an RTE, add some images to it via the image picker and create some internal links to other documents, save it, then go see that relation type (Related Media and Related Documents) unders settings and click on the 'relations' app and it will show you the relations created. You can also remove/change those items in the RTE and those relations will be removed/updated.