-
Notifications
You must be signed in to change notification settings - Fork 33
Support for Relations? #36
Comments
One concern might be that the |
I'd say make sure to use the Lazy< T> class so that they are only loaded when someone tries to access them. Don't want to slow down general Ditto for an edge case. |
👍 on At this stage, I'm only noting this as an idea. If we think it is too much of an edge case, then we can shelve it. |
I've just pushed a new branch for you to look at. This contains a change to the The context I think that would be enough to allow what is needed. Am I correct? |
You're correct! Actually thinking about it, this might remove the need for having my |
@JimBobSquarePants perfect :) @leekelleher how about a caching factory, that'll supply 'clean' POCOs (ones that don't inherit from PublishedContetModel) so once slow relations are inflated, they are in the object graph cache |
@Hendy - we already have pre/post event hooks during the conversion - see |
Awesomesauce! |
Cool. I'll look to remove the |
Ok coke... Should be simple enough too do. We still on for a release tomorrow? |
Yeah, should be good for tomorrow! |
@Hendy mentioned this in the Gitter chatroom.
Consider adding support for Relations.
Then Ditto could get the related node IDs for the associated
IPublishedContent
node and pass the value to the POCO property.e.g.
@Model.RelatedItems
could return aIEnumerable<IRelation>
object type?Details of the
IRelation
interface can be found here.Then for more complex types a custom TypeConverter can be used:
Then the custom
RelationsTypeConverter
can work out how to convert anIEnumerable<IRelation>
intoIEnumerable<IPublishedContent>
.The text was updated successfully, but these errors were encountered: