protected override void OnSetUp()
		{
			base.OnSetUp();

			using (var session = OpenSession())
			{
				for (int h = 1; h < 3; h++)
				{
					for (int i = 1; i < 4; i++)
					{
						var parent = new DomainParent { Id1 = h, Id2 = i };
						session.Save(parent);

						var parentId = new DomainParentWithComponentId { Id = { Id1 = h, Id2 = i } };
						session.Save(parentId);

						for (int j = 1; j < 4; j++)
						{
							var child = new DomainChild { ParentId1 = h, ParentId2 = i };
							session.Save(child);

							var childId = new DomainChildWCId { ParentId1 = h, ParentId2 = i };
							session.Save(childId);
						}
					}
				}

				session.Flush();
			}
		}
Exemple #2
0
        protected override void OnSetUp()
        {
            base.OnSetUp();

            using (var session = OpenSession())
            {
                for (int h = 1; h < 3; h++)
                {
                    for (int i = 1; i < 4; i++)
                    {
                        var parent = new DomainParent {
                            Id1 = h, Id2 = i
                        };
                        session.Save(parent);

                        var parentId = new DomainParentWithComponentId {
                            Id = { Id1 = h, Id2 = i }
                        };
                        session.Save(parentId);

                        for (int j = 1; j < 4; j++)
                        {
                            var child = new DomainChild {
                                ParentId1 = h, ParentId2 = i
                            };
                            session.Save(child);

                            var childId = new DomainChildWCId {
                                ParentId1 = h, ParentId2 = i
                            };
                            session.Save(childId);
                        }
                    }
                }

                session.Flush();
            }
        }