Skip to content

Commit 64f7626

Browse files
authored
Merge pull request #427 from servicetitan/mergeUpstream
Merge upstream
2 parents 4618465 + 2d0043a commit 64f7626

20 files changed

+3163
-532
lines changed

ChangeLog/7.2.0-Z_Final.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[main] Changes of Persistent objects in events Persisted/TransactionCommitting/TransactionCommitted became prohibited to prevent possible loss of changes
2+
[main] Memory efficiency and performance improvements of upgrade process
3+
[postgresql] Server-side statement timeout handled as TimeoutException

ChangeLog/7.2.0-dev.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

Orm/Xtensive.Orm.Tests/Storage/DataLossOnEventsPrevention/EntityChangesTest.cs

Lines changed: 505 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Copyright (C) 2025 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
4+
5+
namespace Xtensive.Orm.Tests.Storage.DataLossOnEventsPrevention.EntityChangeDuringPersistTestModel
6+
{
7+
public abstract class TestBoundEntity : Entity
8+
{
9+
[Field, Key]
10+
public int Id { get; private set; }
11+
12+
[Field]
13+
public string TestIdentifier { get; private set; }
14+
15+
public TestBoundEntity(Session session, string testIdentifier)
16+
: base(session)
17+
{
18+
TestIdentifier = testIdentifier;
19+
}
20+
}
21+
22+
[HierarchyRoot]
23+
public class SimpleEntity : TestBoundEntity
24+
{
25+
[Field]
26+
public int Value { get; set; }
27+
28+
public SimpleEntity(Session session, string testIdentifier)
29+
: base(session, testIdentifier)
30+
{
31+
}
32+
}
33+
34+
[HierarchyRoot]
35+
public class NonPairedEntitySetContainer : TestBoundEntity
36+
{
37+
[Field]
38+
public EntitySet<RefEntity> Refs { get; private set; }
39+
40+
public NonPairedEntitySetContainer(Session session, string testIdentifier)
41+
: base(session, testIdentifier)
42+
{
43+
}
44+
}
45+
46+
[HierarchyRoot]
47+
public class RefEntity : TestBoundEntity
48+
{
49+
[Field]
50+
public int Value { get; set; }
51+
52+
public RefEntity(Session session, string testIdentifier)
53+
: base(session, testIdentifier)
54+
{
55+
}
56+
}
57+
58+
[HierarchyRoot]
59+
public class PairedEntitySetContainer : TestBoundEntity
60+
{
61+
[Field]
62+
[Association(PairTo = nameof(PairedRefEntity.Container))]
63+
public EntitySet<PairedRefEntity> Refs { get; private set; }
64+
65+
public PairedEntitySetContainer(Session session, string testIdentifier)
66+
: base(session, testIdentifier)
67+
{
68+
}
69+
}
70+
71+
[HierarchyRoot]
72+
public class PairedRefEntity : TestBoundEntity
73+
{
74+
[Field]
75+
public PairedEntitySetContainer Container { get; set; }
76+
77+
[Field]
78+
public int Value { get; set; }
79+
80+
public PairedRefEntity(Session session, string testIdentifier)
81+
: base(session, testIdentifier)
82+
{
83+
}
84+
}
85+
86+
[HierarchyRoot]
87+
public class NonPairedReferencingEntity : TestBoundEntity
88+
{
89+
[Field]
90+
public NonPairedReferencedEntity Ref { get; set; }
91+
92+
public NonPairedReferencingEntity(Session session, string testIdentifier)
93+
: base(session, testIdentifier)
94+
{
95+
}
96+
}
97+
98+
[HierarchyRoot]
99+
public class NonPairedReferencedEntity : TestBoundEntity
100+
{
101+
[Field]
102+
public int Value { get; set; }
103+
104+
public NonPairedReferencedEntity(Session session, string testIdentifier)
105+
: base(session, testIdentifier)
106+
{
107+
}
108+
}
109+
}

Orm/Xtensive.Orm.Tests/Storage/DataLossOnEventsPrevention/NonPairedEntitySetChangesTest.cs

Lines changed: 623 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)