Esempio n. 1
0
        public void TestOwnEmbedded()
        {
            var    pm = PmFactory.NewPersistenceManager();
            Parent p1 = new Parent();

            pm.MakePersistent(p1);
            pm.Save();

            ChildEmbedded ce = new ChildEmbedded();

            p1.ChildEmbedded = ce;
            Assert.AreEqual(NDOObjectState.PersistentDirty, p1.NDOObjectState, "Falscher Status 1");
        }
Esempio n. 2
0
        public void TestEmbedded()
        {
            var    pm = PmFactory.NewPersistenceManager();
            Parent p1 = new Parent();
            Parent p2 = new Parent();

            pm.MakePersistent(p1);
            pm.MakePersistent(p2);
            pm.Save();

            ChildEmbedded ce = new ChildEmbedded();

            p1.ManipulateEmbedded(p2, ce);
            Assert.AreEqual(NDOObjectState.Persistent, p1.NDOObjectState, "Falscher Status 1");
            Assert.AreEqual(NDOObjectState.PersistentDirty, p2.NDOObjectState, "Falscher Status 2");
        }