Realm-dotnet: Support Enum types

Created on 19 May 2016  路  2Comments  路  Source: realm/realm-dotnet

Goal

Support Enum type properties in RealmObjects. Currently it is possible to persist the backing value by creating a separate property in the enum value type, such as byte or int, and ignoring the enum property. It would be more convenient for the developer if Enum type properties were supported by the Fody weaver.

Version of Realm and tooling

Realm version(s): 0.74.1

Xamarin/Visual Studio version: Xamarin Studio 6.0 (build 5156)

Which operating system version and device: Mac OS X 10.11.5

Blocked O-Community Pipeline-Idea-Backlog T-Feature

Most helpful comment

@AndyDentFree I might suggest that you look at how EntityFramework handles an enum by storing them as an int in the database and converting it back to the int when it initializes the object. That said it looks like you guys have this issue both here and #740. I might suggest bumping this up in priority.

All 2 comments

This is complicated a bit by having to reach agreement on what it means to other languages, so Realm files remain compatible.

See Java request and Swift request.

@AndyDentFree I might suggest that you look at how EntityFramework handles an enum by storing them as an int in the database and converting it back to the int when it initializes the object. That said it looks like you guys have this issue both here and #740. I might suggest bumping this up in priority.

Was this page helpful?
0 / 5 - 0 ratings