Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not store records generated properties #151

Merged

Conversation

yardee
Copy link
Contributor

@yardee yardee commented Oct 11, 2024

We got exception when serializing records

System.InvalidOperationException : Trying to serialize type RecordData and property EqualityContract does not have setter. If you don't want to serialize this property add [NotStored] attribute.
   at BTDB.EventStoreLayer.ObjectTypeDescriptor.CheckObjectTypeIsGoodDto(Type type, BindingFlags propertyBindingFlags) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:line 83
   at BTDB.EventStoreLayer.ObjectTypeDescriptor.FinishBuildFromType(ITypeDescriptorFactory factory) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:line 110
   at BTDB.EventStoreLayer.TypeSerializers.BuildFromTypeCtx.Create(Type type) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializers.cs:line 202
   at BTDB.EventStoreLayer.ObjectTypeDescriptor.FinishBuildFromType(ITypeDescriptorFactory factory) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:line 115
   at BTDB.EventStoreLayer.TypeSerializers.BuildFromTypeCtx.Create(Type type) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializers.cs:line 202
   at BTDB.EventStoreLayer.ListTypeDescriptor.FinishBuildFromType(ITypeDescriptorFactory factory) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/ListTypeDescriptor.cs:line 76
   at BTDB.EventStoreLayer.TypeSerializers.BuildFromTypeCtx.Create(Type type) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializers.cs:line 202
   at BTDB.EventStoreLayer.ObjectTypeDescriptor.FinishBuildFromType(ITypeDescriptorFactory factory) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:line 115
   at BTDB.EventStoreLayer.TypeSerializers.BuildFromTypeCtx.Create(Type type) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializers.cs:line 202
   at BTDB.EventStoreLayer.ObjectTypeDescriptor.FinishBuildFromType(ITypeDescriptorFactory factory) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/ObjectTypeDescriptor.cs:line 115
   at BTDB.EventStoreLayer.TypeSerializers.BuildFromTypeCtx.Create(Type type) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializers.cs:line 202
   at BTDB.EventStoreLayer.TypeSerializers.BuildFromType(Type type) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializers.cs:line 102
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at BTDB.EventStoreLayer.TypeSerializers.DescriptorOf(Type objType) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializers.cs:line 91
   at BTDB.EventStoreLayer.TypeSerializersMapping.StoreNewDescriptors(Object obj) in /Users/borisletocha/Research/BTDB/BTDB/EventStoreLayer/TypeSerializersMapping.cs:line 284
   at Gmc.Cloud.Infrastructure.Migration.Serializer.Serialize(MemWriter& writer, Object object)

@Bobris Bobris merged commit 956279d into Bobris:master Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants