Issue with RePo

Jul 19, 2010 at 2:37 PM

 

Hi Ralf

In order to accommodate your request I post my problem here.

I ran into 2 situations were repo is throwing unhandled exceptions while testing the repo. Both within the 'ObjectGraphDenormilizer-factories.cs' file.

  • MissingMethodException (Für dieses Objekt wurde kein parameterloser Konstruktor definiert)
  • NullReferenceException (Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt)

I have the following class implemented:

EntityBase - implements the ILoungeRepoEntityIdentity Interface

class EntityBase : ILoungeRepoEntityIdentity
    {
        protected string id;

        public string Id
        {
            get { return id; }
            set { id = value; }
        }

        public string Partition { get { return this.GetType ().Name; } }
    }

Element - implement some properties and derives from EntityBase

class Element : EntityBase
    {
        private int _oz;
        private string _name;
        private string _sym;
        private Aggregatzustaende _agg;

        public int Ordnungszahl { get { return _oz; } set { _oz = value; } }
        public string ElementName { get { return _name; } set { _name = value; } }
        public string ElementSymbol { get { return _sym; } set { _sym = value; } }
        public Aggregatzustaende Aggregatzustand { get { return _agg; } set { _agg = value; } }

        public enum Aggregatzustaende { unbekannt = 0, fluessig, fest, gas }

        public Element ()
        {
            Ordnungszahl = 0;
            ElementName = "No Element";
            ElementSymbol = "?";
            Aggregatzustand = Aggregatzustaende.unbekannt;
            Id = "0";
        }

RezeptElement - implements specific properties and derives from Element

class RezeptElement : Element
    {
        public int MinPPM { get; set; }
        public int MaxPPM { get; set; }

        public RezeptElement ()
            : base ()
        {
            MinPPM = 0;
            MaxPPM = 0;
        }

InputMaterial - implements properties, especially a SortedList<int, Rezeptelement>

class InputMaterial : EntityBase
    {
        SortedList<int, RezeptElement> materialElementCollection;

        public enum MaterialTypen { unbekannt = 0, Abfall, Additiv }

        public int MaterialNummer { get; set; }
        public string MaterialName { get; set; }
        public Element.Aggregatzustaende Aggregatzustand { get; set; }
        public int SchuettDichte { get; set; }
        public int Feuchte { get; set; }
        public double PHwert { get; set; }
        public MaterialTypen MaterialTyp { get; set; }

        public InputMaterial ()
            : base ()
        {
            MaterialNummer = 0;
            MaterialName = "No Name";
            Aggregatzustand = Element.Aggregatzustaende.unbekannt;
            SchuettDichte = 0;
            Feuchte = 0;
            PHwert = 7.0;
            MaterialTyp = MaterialTypen.unbekannt;
            materialElementCollection = new SortedList<int, RezeptElement> ();
            Id = "0";
        }

Within my test I create and store two InputMaterials. Checking the Id & Partition proved to be ok.

When loading the objects with a newly instantiated repo I run in either one of the error messages. The exceptions popp up arbitrarily but only these two.

 using (LoungeRepository repo1 = new LoungeRepository (repoPath))
            {
                repo1.Store (Input1);
                repo1.Store (Input2);
            }

            // lösche die Materialdefinitionen
            //Input1 = null; -> führt zu denselben Fehlern
            Input1 = new InputMaterial ();
            Input2 = null;

            using (LoungeRepository repo2 = new LoungeRepository (repoPath))
            {
                Input1 = repo2.Load<InputMaterial> ("1", Input1.GetType ().Name); // <- here the exceptions are thrown;
                Input2 = repo2.Load<InputMaterial> ("2", Input1.GetType ().Name);
            }

If I use the Prefetch-Methode it comes back with no objects loaded.

I would happily learn how to correct this!

It would be a great help if the interfaces and parameters are described at all.
Within the Object-Catalouge the missing information is hampering the understanding of the Software quite a bit.

Hope to hear from you soon!

 

Coordinator
Jul 19, 2010 at 3:12 PM
@hpm: Just to make sure: You know, that public auto properties in base classes will not get their hidden private fields initialized. This has not been implemented, but it´s on my todo list. Other than that... check if for example your class Aggregatzustand has a ctor with params. The lounge repo is telling you it stumbles over a class missing such a ctor. If the problem persists please let me know the whole error messages including line numbers/stack trace. Thx.
Jul 19, 2010 at 4:10 PM

@ralfw: Every class has a parameterless constructor aka ctor or is copying constructor required? (Aggregatzustand is an enum). The classes used are Element, RezeptElement, InputMaterial and EntityBase.

I did not use private hidden fields in Element vs. in RezeptElements I did. But RezeptElement is not a base class it is a derived class. Where to send the requested information? Thx. hpm

 

Coordinator
Jul 19, 2010 at 4:49 PM
@hpm: Hm... don´t know where the problem lies. You need to narrow it down. Make your object model smaller. Can you reduce your failing scenario to 1 object being stored? What can you take away from your current scenario to make it work?
Jul 19, 2010 at 5:05 PM

@ralfw: Will reduce it to one class and then start to make it more complex again.

 

Jul 19, 2010 at 5:46 PM

@ralfw:It works fine with EntityBase + Element. But it fails with three classes

So I have implemented 3 classes. They are composed are follows:

EntityBase -> Element -> RezeptElement

 

    class EntityBase : ILoungeRepoEntityIdentity
    {
        protected string id;

        public string Id
        {
            get { return id; }
            set { id = value; }
        }

        public string Partition { get { return this.GetType ().Name; } }
     }

class Element : EntityBase
    {
        private int _oz;
        private string _name;
        private string _sym;
        private Aggregatzustaende _agg;

        public int Ordnungszahl { get { return _oz; } set { _oz = value; } }
        public string ElementName { get { return _name; } set { _name = value; } }
        public string ElementSymbol { get { return _sym; } set { _sym = value; } }
        public Aggregatzustaende Aggregatzustand { get { return _agg; } set { _agg = value; } }

        public enum Aggregatzustaende { unbekannt = 0, fluessig, fest, gas }

        public Element ()
        {
            Ordnungszahl = 0;
            ElementName = "No Element";
            ElementSymbol = "?";
            Aggregatzustand = Aggregatzustaende.unbekannt;
            Id = "0";
        }

        public Element (int oz, string en, string es, Aggregatzustaende ag)
        {
            Ordnungszahl = oz;
            ElementName = en;
            ElementSymbol = es;
            Aggregatzustand = ag;
            Id = Ordnungszahl.ToString ("#");
        }

        public override string ToString ()
        {
            return String.Format ("\tElement: {0} : {1} : {2} : {3} : Id <{4}> : Partition <{5}>",
                                    this.Ordnungszahl, this.ElementSymbol, this.ElementName, Enum.GetName (typeof (Aggregatzustaende), Aggregatzustand),
                                    this.Id, this.Partition);
        }
    }
class RezeptElement : Element
    {
        public int MinPPM { get; set; }
        public int MaxPPM { get; set; }

        public RezeptElement ()
            : base ()
        {
            MinPPM = 0;
            MaxPPM = 0;
        }

        public RezeptElement (Element e, int min, int max)
            : base (e.Ordnungszahl, e.ElementName, e.ElementSymbol, e.Aggregatzustand)
        {
            MinPPM = min;
            MaxPPM = max;
        }

        public override string ToString ()
        {
            StringBuilder sb = new StringBuilder ();

            sb.Append (String.Format ("RezeptElement:\tMinPPM = {0} : MaxPPM = {1}", MinPPM, MaxPPM));
            sb.Append (String.Format ("\n\tElement: {0} : {1} : {2} : {3}\n\tId <{4}> : Partition <{5}>",
                                    this.Ordnungszahl, this.ElementSymbol, this.ElementName, Enum.GetName (typeof (Aggregatzustaende), Aggregatzustand),
                                    this.Id, this.Partition));
            return sb.ToString ();
        }
    }
In the Test I have produced 2 Object <RezeptElement> stored loaded them:

            using (LoungeRepository repo1 = new LoungeRepository (repoPath))
            {
                repo1.Store (elem1);
                repo1.Store (elem2);
            }

            elem1 = new RezeptElement ();
            elem2 = new RezeptElement ();

            using (LoungeRepository repo2 = new LoungeRepository (repoPath))
            {
                elem1 = repo2.Load<RezeptElement> (RezeptElementCollection[1].Ordnungszahl.ToString(), elem1.GetType ().Name);
                elem2 = repo2.Load<RezeptElement> (RezeptElementCollection[2].Ordnungszahl.ToString (), elem2.GetType ().Name);
            }
Upon loading the data from RezeptElement is loaded correctly but not from the underlying Element. It seems quite obvious that the loading is not restoring the values of the properties of the base object.

Aside from the above sample I have also moved the LoungeEntity 'property' from the Element class to the RezeptElement class and have gotten the same result. The RezeptElement properties were filled correctly but not the Element once.

Any idea?

Jul 19, 2010 at 5:57 PM

@ralfw:

The output of the etst is as follwos:

before save:

RezeptElement: MinPPM = 1600 : MaxPPM = 4000

Element: 8 : O : Sauerstoff : gas

ID <8> : Partition <RezeptElement>

everything looks fine.

after load:

RezeptElement: MinPPM = 1600 : MaxPPM = 4000

Element: 0 : ? : No Element : unbekannt

ID <8> : Partition <RezeptElement>

The Element values are from the constructor without parameters!

Coordinator
Jul 19, 2010 at 6:01 PM
@hpm: Try making all private members public. I suspect it´s the lounge repo not (de)normalizing private base class fields.
Jul 20, 2010 at 9:38 AM

@ralfw: I did change the private fields in the Element class to protected (and tested internal, public as well) and it worked correct.

Now I have added the class InputMaterial which add some properties and a SortedList<int, RezeptElement>. The class also derives from EntityBase.

Now I have the structure of three classes each being a LoungeRpository Entity. All of them are stored correctly in separate subdirectories - namely

RezeptElement and InputMaterial.

But now I am running into the error of "MissingMehtodException. Parameterless constructor for this object missing. The Exception is thrown in

CreateDenormalizedObject(..) right at the first line staring with var denormalizedObject = Activator.....

Any idea?

 

Coordinator
Jul 20, 2010 at 3:20 PM
Ok, one problem solved. On to the next one ;-) If the lounge repo reports there is a missing parameterless ctor, well, then there is one in the object hierarchy. And that´s only detected upon denormalization. So please check if you´ve introduced any types without a parameterless ctor.
Jul 20, 2010 at 4:17 PM

@ralfw: Correct :-)) - But I checked my four classes (EntityBase, Element, RezeptElement and InputMaterial) they all have a ctor, i.e. like EntityBase () or Element () : base () all are marked public.

 

Jul 20, 2010 at 4:35 PM

@ralfw: The only thing I can think of is the SortedList<int,Element> I am using. The Exception says something about a sorted list. I am instantiating the SortedList within the parameterless ctor of InputMaterial.

Might that create the problem?

 

Jul 20, 2010 at 4:51 PM

@ralfw: Maybe some ore information from VS2010 might be helpful?

Here is an excerpt of the details of the error message.

System.MissingMethodException wurde nicht behandelt. Message=Für dieses Objekt wurde kein parameterloser Konstruktor definiert. Source=mscorlib StackTrace: bei System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) bei System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) bei System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) bei System.Activator.CreateInstance(Type type, Boolean nonPublic) bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.CreateDenormalizedObject(INormalizedObject normalizedObject) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer - factories.cs:Zeile 11. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.DenormalizeSingleObject(INormalizedObject normalizedObject) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer.cs:Zeile 45. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.Denormalize(INormalizedObject normalizedObject) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer.cs:Zeile 27. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.TryDenormalizeComplexTypeValue(Object value, Object& denormalizedValue) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer - field denormalization.cs:Zeile 80. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.DenormalizeFieldValue(Object fieldValue) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer - field denormalization.cs:Zeile 53. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.DenormalizeNonTransientFields(INormalizedObject source, Object destination) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer - field denormalization.cs:Zeile 22. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.DenormalizeSingleObject(INormalizedObject normalizedObject) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer.cs:Zeile 47. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.Denormalize(INormalizedObject normalizedObject) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer.cs:Zeile 27. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.TryDenormalizeComplexTypeValue(Object value, Object& denormalizedValue) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer - field denormalization.cs:Zeile 80. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.DenormalizeFieldValue(Object fieldValue) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer - field denormalization.cs:Zeile 53. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.DenormalizeNonTransientFields(INormalizedObject source, Object destination) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer - field denormalization.cs:Zeile 22. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.DenormalizeSingleObject(INormalizedObject normalizedObject) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer.cs:Zeile 47. bei LoungeRepo.Normalizer.ObjectGraphDenormalizer.Denormalize(INormalizedObject normalizedObject) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\ObjectGraphDenormalizer.cs:Zeile 27. bei LoungeRepo.Normalizer.EntityNormalizer.Denormalize(INormalizedEntity normalizedEntity) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Normalizer\EntityNormalizer.cs:Zeile 34. bei LoungeRepo.Core.LoungeRepository.Load(String id, String partition) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Core\LoungeRepository.cs:Zeile 88. bei LoungeRepo.Core.LoungeRepository.Load[T](String id, String partition) in S:\my.projects\The Lounge Repository.codeplex.svn\source\The Lounge Repository\LoungeRepo.Core\LoungeRepository.cs:Zeile 73. bei RePoTest.Program.Main(String[] args) in X:\My Documents\C# Projekte\LoungeRepositoryTest\RePoTest\Program.cs:Zeile 51. bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() bei System.Threading.ThreadHelper.ThreadStart_Context(Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart() InnerException: __________________________________________ normalizedObject.ObjectType = {Name = "ValueList" FullName = "System.Collections.Generic.SortedList`2+ValueList[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[RePoTest.RezeptElement, RePoTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken... DeclaringMethod "(normalizedObject.ObjectType).DeclaringMethod" hat eine Ausnahme vom Typ "System.InvalidOperationException" verursacht. System.Reflection.MethodBase {System.InvalidOperationException} DeclaringType {Name = "SortedList`2" FullName = "System.Collections.Generic.SortedList`2"} System.Type {System.RuntimeType}

 

Coordinator
Jul 20, 2010 at 9:31 PM
Although the documentation states SortedList has a paramless ctor (http://msdn.microsoft.com/en-us/library/system.collections.sortedlist.sortedlist.aspx) it might be that a class used by SortedList has not. But you can check easily for yourself. Just persist/depersist a SortedList and see what happens.
Jul 26, 2010 at 8:54 AM

@ralfw: I have simplified the test and the error pop up with the SortedList<,> generation. However the parameter for the SortedList are <int, Element> of which the later is one provided be me.

The class Element has an parameterless ctor.

Coordinator
Jul 26, 2010 at 10:03 AM
Does it make a difference using SortedList<,> and not using it?
Jul 26, 2010 at 11:10 AM

Yes. If I use it it fails - if I don't it works.

 

Coordinator
Jul 26, 2010 at 12:20 PM
See, so there must be an object with a ctor requiring params somewhere in that object graph with the sorted list as its root. Sorry, can´t do anything against that, I fear. At least not with reasonable effort right now. The only way out I see is to be able to register factories for certain types of data.
Jul 26, 2010 at 1:11 PM
 

Okay. But since I truly would like to use the LoungeRepository a last try. I have reduced everything. I simply have the following code.

I produce some Elements. Instantiate an InputMaterial and populate the SortedList<int,Element> with three Elements. Then I store it. I declare a new InputMaterial and load it.

The output of the program shows - as expected three calls to the Element ctor and one to the InputMaterial ctor upon creation of the initial InputMaterial.

Upon loading the calling sequence is: InputMaterial ctor and three times the Element ctor - which is painfully correct. And then it crashes with this error message "missing ctor". After is has called them all! And that is strange, isn't it?

static void Main (string[] args)
        {
            List<Element> ElementCollection = new List<Element> ();

            ElementCollection.Add (new Element (6));
            ElementCollection.Add (new Element (8));
            ElementCollection.Add (new Element (11));
            ElementCollection.Add (new Element (12));
            ElementCollection.Add (new Element (13));
            ElementCollection.Add (new Element (15));
            ElementCollection.Add (new Element (16));
            ElementCollection.Add (new Element (20));

            InputMaterial inp1 = GenerateInputMaterial (1, ElementCollection);
            
            Console.WriteLine ("\n---------------- Erzeugung beendet ---------------\n");
            Console.WriteLine (inp1.ToString ());
            
            Console.ReadKey ();

            using (LoungeRepository repo1 = new LoungeRepository ())
            {
                repo1.Store (inp1);
            }

            Console.WriteLine ("\n---------------- Speichern beendet ---------------\n");

            InputMaterial inp4;
            
            using (LoungeRepository repo2 = new LoungeRepository ())
            {
                inp4 = repo2.Load<InputMaterial> ("1", inp1.GetType ().Name);
            }
            Console.WriteLine ("\n---------------- Laden beendet ---------------\n");
            
            Console.WriteLine (inp4.ToString ());
            
            Console.ReadKey ();
        }

        private static InputMaterial GenerateInputMaterial (int p, List<Element> l)
        {
            InputMaterial inp = new InputMaterial (p);

            for (int i = p; i < p + 3; i++)
                inp.AddMaterialElement (l[i]);
            return inp;
        }

//------------------------------------------ InputMaterial ---------------------------/

class InputMaterial : EntityBase
    {
        protected SortedList<int, Element> materialElementCollection = new SortedList<int, Element> ();

        public InputMaterial ()
            : base ()
        {
            Id = "0";
            Console.WriteLine ("Input ctor - Id = {0}", Id);
        }

        public InputMaterial (int i)
            : this ()
        {
            Id = i.ToString ("#");
            Console.WriteLine ("parameter Input - Id = {0}", Id);
        }

        public override string ToString ()
        {
            StringBuilder sb = new StringBuilder ();

            sb.Append (String.Format ("InputMaterial:\n\tNummer = {0} : \n\t RePo_ID = {1}, RePo_Partition = {2}\n",
                                        this.Id, this.Id, this.Partition));
            foreach (Element e in materialElementCollection.Values)
                sb.Append (e.ToString ());
            return sb.ToString ();
        }

        public void AddMaterialElement (Element e)
        {
            if (materialElementCollection.ContainsKey (e.Ordnungszahl))
                return;
            materialElementCollection.Add (e.Ordnungszahl, e);
        }
    }
// ---------------------------------- Element --------------------------

 class Element : EntityBase
    {
        protected int _oz;

        public int Ordnungszahl { get { return _oz; } set { _oz = value; } }

        public Element ()
            : base ()
        {
            Ordnungszahl = 0;
            Id = "0";
            Console.WriteLine ("Element ctor Id={0}", Id);
        }

        public Element (int oz)
            : this ()
        {
            Ordnungszahl = oz;
            Id = Ordnungszahl.ToString ("#");
            Console.WriteLine ("Element parameter Konstruktor: id = {0}", Id);
        }

        public override string ToString ()
        {
            return String.Format ("\tElement: {0} : Id <{1}> : Partition <{2}>\n",
                                    this.Ordnungszahl,  this.Id, this.Partition);
        }
    }
// ------------------------ EntityBase ---------------------

class EntityBase : ILoungeRepoEntityIdentity
    {
        public EntityBase ()
        {
        }

        // ist notwendig um den Zugriff auf das Feld bei der Deserialisierung zu gewährleisten
        // da Reflection nicht auf backing store felder zugreifen kann -> anonyme Eigenschaften
        protected string _id;

        public string Id { get { return _id; } set { _id = value; } }

        // Liefert als Partition den Namen des ObjektTyps - Damit die erbende Klasse!
        public string Partition { get { return this.GetType ().Name; } }
    }
Thank you for looking at this one more time!
Peter

 

 

 

 class Element : EntityBase
    {
        protected int _oz;

        public int Ordnungszahl { get { return _oz; } set { _oz = value; } }

        public Element ()
            : base ()
        {
            Ordnungszahl = 0;
            Id = "0";
            Console.WriteLine ("Element ctor Id={0}", Id);
        }

        public Element (int oz)
            : this ()
        {
            Ordnungszahl = oz;
            Id = Ordnungszahl.ToString ("#");
            Console.WriteLine ("Element parameter Konstruktor: id = {0}", Id);
        }

        public override string ToString ()
        {
            return String.Format ("\tElement: {0} : Id <{1}> : Partition <{2}>\n",
                                    this.Ordnungszahl,  this.Id, this.Partition);
        }
    }
Coordinator
Jul 26, 2010 at 5:51 PM
When you store an object graph and with the same lounge repo instance load it, actually what happens is: the graph gets persisted, but the graph does not get depersisted upon loading. Instead the load request is served from the entity cache. That´s why you don´t experience any exception at first. But then, once you try loading with a different lounge repo instance the cache is empty and depersisting is tried - and a ctor is found missing.
Jul 27, 2010 at 9:02 AM

Hmm. That translates to me as follows: I have to fill the cache first and then try to load the objects. Correct? The appropriate method for that is LoungeRepo.Core.Extension.PrefetchAll() isn't it?

And access to each entity is performed by GetExtent<T> or may Load be used as well?

Coordinator
Jul 27, 2010 at 9:51 AM
No, that translates to: the exception is only thrown if objects really get depersisted.
Coordinator
Jul 27, 2010 at 9:52 AM
There is currently no way out: all objects in an object graph given to the lounge repo must have a parameterless ctor. Sadly it´s that simple. Maybe, though, in the future I implement some workaround/solution.
Jul 27, 2010 at 11:36 AM

Okay. Too bad. BUt thank you very much for the time and effort to assist in this issue.