Can you show the record and migration maybe?

From: Chris Bower [mailto:[email protected]]
Sent: Tuesday, February 01, 2011 2:53 PM
To: [email protected]
Subject: ContentPart not saving/updating

Hey all,
I've got a content part that is a relation to another content item similar to 
the SponsorPart in the RelationExample project. I pretty much followed that 
example exactly, yet when I hit save on the content item I'm editing, the 
linking field is not getting saved. In my service I can see the field 
(part.Image) getting set properly here:

public void UpdateImageAttachmentForContentItem(ContentItem contentItem, 
EditImageAttachment model)

        {

            var part = contentItem.As<ImageAttachmentPart>();

            if (model.ImageId != null)

            {

                part.Image = _contentManager.Get(model.ImageId.Value);

            }

            else

            {

                part.Image = null;

            }



        }

Yet when the editor refreshes the field is no longer set. I check in the 
database and there is a record for my content part, but only the parent content 
item id is set. The related content id is NULL.

What could I be doing wrong?
---
You are currently subscribed to orchard-discuss as: 
[email protected]<mailto:[email protected]>.
To unsubscribe send a blank email to 
[email protected]<mailto:[email protected]>.


---
You are currently subscribed to orchard-discuss as: [email protected].
To unsubscribe send a blank email to [email protected].

Reply via email to