I'm using ISitecoreService (Glass.Sitecore.Mapper, Version=2.0.11.0)
to save a glass item defined like this in Sitecore.NET 6.6.0 (rev. 130111):
[SitecoreClass(false,"{3ACCADE1-C482-422C-9A22-3479C661B6AD}")]
public partial interface IAnnouncementInfoItem:ISitecoreItem
{
[SitecoreField(FieldName = "Announcement Text",CodeFirst = false)]
string AnnouncementText { get; set; }
[SitecoreField(FieldName = "Working Groups",CodeFirst = false)]
IEnumerable<Guid> WorkingGroups { get; set; }
}
I'm running into an issue with the MultiList (mapped as IEnumerable<Guid>
) where each value shows up as "Not in List" even though the value is clearly in the source.
The Guids match up correctly with the items defined in the source. It even finds the names of the values correctly. The only difference I have found between the items saved through SitecoreService
and those saved from Content editor is that the Guids are saved as lowercase values when saved from SitecoreService.
Has anyone ran into this issue before? It seems like there is some case sensitivity happening but not sure if this is a bug in Sitecore, GlassMapper or something else entirely.
Update
When saving the item I'm passing in some text and a list of Guids:
public void SaveAnnouncement(Guid announcementId, string text, IList<Guid> workingGroupIds)
{
var announcementItem =
_srcItem.AnnouncementsFolderItem.GetChildrenOfType<IAnnouncementItem>().FirstOrDefault(c => c.Id == announcementId);
announcementItem.AnnouncementText = text;
announcementItem.Name = ItemUtil.ProposeValidItemName(text);
announcementItem.WorkingGroups = workingGroupIds ?? new List<Guid>();
using (new SecurityDisabler())
{
//wrapper on SitecoreServiceMaster
_dependencies.GlassSitecoreServiceManager.Master.Save(item);
}
}
WorkingGroups
property and saving the item?