I am creating a little module for Orchard where I have a parent child relationship between two contenttypes. Both types are draftable.
Game -> Objectives
I am using the Container field in the CommonPart to set the game as a container for the objective. I am doing this from a custom admin controller.
Creating goes fine, and everything is saved in the database. But when I edit the content the Container gives null when the container (Game) isn't published. So When I save again, the container is set to null, but I want to keep the unpublished game as the container.
I've found that in the CommonPartHandler the lazy loader of the Container only fetches published content items.
part.ContainerField.Loader(() => part.Record.Container == null ? null : _contentManager.Get(part.Record.Container.Id));
Is this on purpose? or is this a hidden bug?
Sjoerd van der Meer