Skip to content

Commit

Permalink
Made order of properties in EventSerializers stable by sorting them b…
Browse files Browse the repository at this point in the history
…y name.
  • Loading branch information
Bobris committed Jun 10, 2018
1 parent 8822bef commit 86b5d31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions BTDB/EventStoreLayer/ObjectTypeDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public bool FinishBuildFromType(ITypeDescriptorFactory factory)
_fields.Add(new KeyValuePair<string, ITypeDescriptor>(GetPersitentName(propertyInfo), descriptor));
}
}
_fields.Sort((l, r) => string.Compare(l.Key, r.Key));
return true;
}

Expand Down
10 changes: 5 additions & 5 deletions BTDBTest/TypeSerializersTest.ComplexDescribe.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
List<String>
BTDBTest.TypeSerializersTest+SimpleDto
{
StringField : String
IntField : VInt32
StringField : String
}
BTDBTest.TypeSerializersTest+ClassWithList
{
Expand All @@ -15,25 +15,25 @@ BTDBTest.TypeSerializersTest+ClassWithDict
}
BTDBTest.TypeSerializersTest+SelfPointing1
{
Other1 : VInt32
Self1 : BTDBTest.TypeSerializersTest+SelfPointing1
Self2 : BTDBTest.TypeSerializersTest+SelfPointing2
{
Other2 : String
Self1 : BTDBTest.TypeSerializersTest+SelfPointing1
Self2 : BTDBTest.TypeSerializersTest+SelfPointing2
Other2 : String
}
Other1 : VInt32
}
BTDBTest.TypeSerializersTest+SelfPointing2
{
Other2 : String
Self1 : BTDBTest.TypeSerializersTest+SelfPointing1
{
Other1 : VInt32
Self1 : BTDBTest.TypeSerializersTest+SelfPointing1
Self2 : BTDBTest.TypeSerializersTest+SelfPointing2
Other1 : VInt32
}
Self2 : BTDBTest.TypeSerializersTest+SelfPointing2
Other2 : String
}
BTDBTest.TypeSerializersTest+TestEnum
enum {
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [unreleased]

### Fixed

Made order of properties in EventSerializers stable by sorting them by name.

## 14.2.1

### Fixed
Expand Down

0 comments on commit 86b5d31

Please sign in to comment.