I am trying to upgrade a Structure field, to be exact to remove a field from a Structure used several times in my model.

Sample model:

  [HiearchyRoot]
  public class MyEntity : Entity
  {
    ...

    [Field]
    public MyStructure MyStructure { get; set; }
  }

  public class MyStructure : Structure
  {
    [Field]
    public string Text1 { get; set; }

    [Field]
    public string Text2 { get; set; }
  }

I want to remove Text1 field : how can I do that?

I tried to add an upgrade hint like this:

new RemoveFieldHint(typeof(MyEntity).Fullname, "MyStructure.Text1");

won't work

new RemoveFieldHint(typeof(MyStructure).Fullname, "Text1");

doesn't work either.

I'm using version 4.3

asked May 09 '11 at 08:19

olorin's gravatar image

olorin
356838489

Hello olorin,

I'll check this.

(May 10 '11 at 04:17) Dmitri Maximov Dmitri%20Maximov's gravatar image

One Answer:

Fixed in revision 7522. Nightly build will be available soon in download section.

You should use the following pattern to remove Text1 field of MyStructure:

new RemoveFieldHint(typeof(MyEntity).Fullname, "MyStructure.Text1");

answered May 12 '11 at 10:13

Dmitri%20Maximov's gravatar image

Dmitri Maximov
22111211

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA