Exemplo n.º 1
0
        protected override void Store()
        {
            var dh1 = new DHolder1();

            dh1._name = "root";
            dh1.CreateDicts();
            dh1.CreateLinkList(8);

            var dh2 = new DHolder2();

            dh2.nDict1 = dh1.nDict1;
            dh2.nDict2 = dh1.nDict2;
            dh2.gDict1 = dh1.gDict1;
            dh2.gDict2 = dh1.gDict2;

            var dh1_2 = new DHolder1();

            dh1_2.CreateDicts();
            dh1_2._name = "update";

            var dh3 = new DHolder3();

            dh3._name = "identity";
            dh3.CreateDicts();

            Db().Store(dh1);
            Db().Store(dh2);
            Db().Store(dh1_2);
            Db().Store(dh3);
        }
Exemplo n.º 2
0
        public void _TestGetByKey()
        {
            IQuery q = NewQuery();

            q.Constrain(typeof(DHolder3));
            q.Descend("_name").Constrain("identity");
            DHolder3 identityHolder = (DHolder3)q.Execute().Next();

            identityHolder.CheckDicts();
        }