Skip to content

Commit c24dbf5

Browse files
hot fix for static variables
1 parent 9eb8a4f commit c24dbf5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Magic.IndexedDb/Helpers/SchemaHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ public static StoreSchema GetStoreSchema(Type type)
232232
schema.PrimaryKeyAuto = compoundKey.AutoIncrement; // AutoIncrement only applies to single primary keys
233233

234234
// Extract Unique Indexes
235-
schema.UniqueIndexes = type.GetProperties()
235+
schema.UniqueIndexes = type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy)
236236
.Where(prop => PropertyMappingCache.GetPropertyEntry(prop, type).UniqueIndex)
237237
.Select(prop => PropertyMappingCache.GetJsPropertyName(prop, type))
238238
.ToList();
239239

240240
// ✅ Extract Standard Indexes
241-
schema.Indexes = type.GetProperties()
241+
schema.Indexes = type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.FlattenHierarchy)
242242
.Where(prop => PropertyMappingCache.GetPropertyEntry(prop, type).Indexed)
243243
.Select(prop => PropertyMappingCache.GetJsPropertyName(prop, type))
244244
.ToList();

Magic.IndexedDb/Magic.IndexedDb.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<PackageReadmeFile>README.md</PackageReadmeFile>
1818
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
1919
<FileVersion>1.01</FileVersion>
20-
<Version>2.0.0-alpha1</Version>
20+
<Version>2.0.0-alpha2</Version>
2121
</PropertyGroup>
2222

2323
<ItemGroup>

TestWasm/Models/Person.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ public sealed class DbSets
6767
[MagicNotMapped]
6868
public string DoNotMapTest { get; set; }
6969

70+
[MagicNotMapped]
71+
public static string DoNotMapTest2 { get; set; }
72+
7073
[MagicNotMapped]
7174
public string SecretDecrypted { get; set; }
7275

0 commit comments

Comments
 (0)