While testing, I found that this model won't pass Domain.Build (4.3 Release, Recreate mode)

public class SampleProcessor : QueueProcessor
  {
    [Field]
    [Association(PairTo = "Owner", OnOwnerRemove = OnRemoveAction.Cascade, OnTargetRemove = OnRemoveAction.Clear)]
    private EntitySet<PersistentString> SampleStringList { get; set; }
  }

  [HierarchyRoot]
  public class PersistentString : Entity
  {
    [Field, Key]
    public long Id { get; private set; }

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

    [Field]
    public SampleProcessor Owner { get; set; }
  }

  public class QueueProcessor
  {

  }

  [HierarchyRoot]
  public abstract class Processor : Entity
  {
    [Field, Key]
    public long Id { get; private set; }
  }

Xtensive.Storage.DomainBuilderException was unhandled
  Message=Unsupported type: 'SampleProcessor'.
  Source=Xtensive.Storage
  StackTrace:
       at Xtensive.Storage.Building.Validator.ValidateFieldType(TypeDef declaringType, Type fieldType, Boolean isKeyField)
       at Xtensive.Storage.Building.ModelInspector.InspectField(TypeDef typeDef, FieldDef fieldDef, Boolean isKeyField)
       at Xtensive.Storage.Building.ModelInspector.Inspect(TypeDef typeDef)
       at Xtensive.Storage.Building.ModelInspector.InspectTypes()
       at Xtensive.Storage.Building.ModelInspector.Run()
       at Xtensive.Storage.Building.Builders.ModelBuilder.Run()
       at Xtensive.Storage.Building.Builders.DomainBuilder.BuildModel()
       at Xtensive.Storage.Building.Builders.DomainBuilder.BuildDomain(DomainConfiguration configuration, DomainBuilderConfiguration builderConfiguration)
       at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildStageDomain(UpgradeStage stage)
       at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration)
       at Xtensive.Storage.Domain.Build(DomainConfiguration configuration)
       at TestDoUpgradeBug.Program.Main(String[] args) in C:\Users\jbenoit.SERENSIA\documents\visual studio 2010\Projects\TestDoUpgradeBug\TestDoUpgradeBug\Program.cs:line 16
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

This is not a big issue for us, but I thought I'll let you know.


Updated at 16.07.2010 11:13:55

Are you sure? I've defined only public class in this sample.

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Jul 15 '10 at 09:53

olorin's gravatar image

olorin
358878792

Probably, this is a duplicate report for this issue: http://code.google.com/p/dataobjectsdot ... ail?id=698

(Jul 15 '10 at 09:53) Alex Yakunin Alex%20Yakunin's gravatar image

Btw, are all the types registered?

(Jul 15 '10 at 09:53) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Ah, clear: neither SampleProcessor, nor QueueProcessor are marked by [HeirarchyRoot], i.e. the referenced type doesn't belong to any hierarchy.

Thus DO can't map field of SampleProcessor type: its key structure is unknown.

answered Jul 16 '10 at 13:55

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

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

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×574

Asked: Jul 15 '10 at 09:53

Seen: 3,603 times

Last updated: Jul 15 '10 at 09:53

powered by OSQA